fix: fetch a file relative to the playbook
This commit is contained in:
parent
b7bdcf3293
commit
6497719ba9
@ -37,17 +37,17 @@
|
||||
dest: kubeadm-join-command
|
||||
when: kubeadm_init.rc == 0
|
||||
- name: fetch join command
|
||||
fetch:
|
||||
ansible.builtin.fetch:
|
||||
src: kubeadm-join-command
|
||||
dest: kubeadm-join-command
|
||||
flat: yes
|
||||
dest: tmp/
|
||||
flat: true
|
||||
when: kubeadm_init.rc == 0
|
||||
|
||||
- name: Join k8s nodes
|
||||
hosts: workers
|
||||
tasks:
|
||||
- name: run kubeadm join
|
||||
command: "{{ lookup('file', 'kubeadm-join-command') }}"
|
||||
command: "{{ lookup('file', 'tmp/kubeadm-join-command') }}"
|
||||
register: kubeadm_join
|
||||
changed_when: kubeadm_join.rc == 0
|
||||
failed_when: kubeadm_join.rc not in [0, 2]
|
||||
|
Loading…
Reference in New Issue
Block a user