mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 05:42:46 +01:00
build
This commit is contained in:
@@ -196,6 +196,11 @@
|
||||
worker_join_cmd: "{{ join_command.stdout }}"
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Save join command
|
||||
set_fact:
|
||||
kube_manager: "{{ inventory_hostname }}"
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Print join command
|
||||
debug:
|
||||
msg: "{{ worker_join_cmd }}"
|
||||
@@ -214,7 +219,7 @@
|
||||
when: inventory_hostname.endswith('-vm01.home.lan')
|
||||
|
||||
- name: Join cluster
|
||||
command: "{{ hostvars['rocky9-vm01.home.lan'].worker_join_cmd }}"
|
||||
command: "{{ hostvars[kube_manager].worker_join_cmd }}"
|
||||
args:
|
||||
creates: /etc/kubernetes/kubelet.conf
|
||||
when: inventory_hostname.endswith('-vm01.home.lan') == false
|
||||
Reference in New Issue
Block a user