diff --git a/playbook.yml b/playbook.yml index 8b0bafe..4b55400 100644 --- a/playbook.yml +++ b/playbook.yml @@ -155,16 +155,22 @@ retries: 3 delay: 30 - # - block: + - block: - # - name: Additional nodes -- Install K3s binary - # ansible.builtin.shell: - # cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage" - # environment: - # K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token - # K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" + - name: Additional nodes -- Install K3s binary + ansible.builtin.shell: + cmd: "curl -sfL https://get.k3s.io | sh -s - server --disable local-storage" + executable: /bin/bash + register: foo + environment: + K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token + K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" - # when: inventory_hostname != ansible_play_hosts[0] + rescue: + - ansible.builtin.debug: + var: foo + + when: inventory_hostname != ansible_play_hosts[0] - name: Deploy applications hosts: localhost