diff --git a/ansible-deploy-k8s/join-workers.yml b/ansible-deploy-k8s/join-workers.yml new file mode 100644 index 0000000..0086403 --- /dev/null +++ b/ansible-deploy-k8s/join-workers.yml @@ -0,0 +1,16 @@ +- hosts: workers + become: yes + gather_facts: yes + + tasks: + - name: Copy join command from Ansiblehost to the worker nodes. + become: yes + copy: + src: /tmp/kubernetes_join_command + dest: /tmp/kubernetes_join_command + mode: 0777 + + - name: Join the Worker nodes to the cluster. + become: yes + command: sh /tmp/kubernetes_join_command + register: joined_or_not