mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Only run node creation on the first master
True, we can only have one master today, but this gets us ready for when it comes later
This commit is contained in:
parent
4e8a29c2ca
commit
a94d8e361e
@ -28,6 +28,7 @@
|
||||
changed_when: false
|
||||
with_items:
|
||||
groups['minions']
|
||||
when: inventory_hostname == groups['masters'][0]
|
||||
|
||||
- name: Load minion definition into master
|
||||
command: /usr/bin/kubectl create -f /tmp/node-{{ item }}.json
|
||||
@ -36,12 +37,14 @@
|
||||
changed_when: "command_result.rc == 0"
|
||||
with_items:
|
||||
groups['minions']
|
||||
when: inventory_hostname == groups['masters'][0]
|
||||
|
||||
- name: Delete minion definitions from master
|
||||
file: path=/tmp/node-{{ item }}.json state=absent
|
||||
changed_when: false
|
||||
with_items:
|
||||
groups['minions']
|
||||
when: inventory_hostname == groups['masters'][0]
|
||||
|
||||
- include: firewalld.yml
|
||||
when: has_firewalld
|
||||
|
Loading…
Reference in New Issue
Block a user