diff --git a/ansible/playbook.yaml b/ansible/playbook.yaml index 65d4e57..74c38a3 100644 --- a/ansible/playbook.yaml +++ b/ansible/playbook.yaml @@ -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]