From c593bfcb5da078900c04e2c99f79f6499896bd75 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Sun, 24 Apr 2022 23:00:29 +0200 Subject: [PATCH] Attempt installation with different shell --- playbook.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) 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