mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-06 19:52:42 +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:
@@ -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
|
||||
|
Reference in New Issue
Block a user