diff --git a/ansible/roles/setup/tasks/main.yml b/ansible/roles/setup/tasks/main.yml index a2193f2a96e433d7dc93f3f3f01e55c203ef9bc5..0811c39f1d54863e860c2099596b8210caa41abd 100644 --- a/ansible/roles/setup/tasks/main.yml +++ b/ansible/roles/setup/tasks/main.yml @@ -8,7 +8,13 @@ line: "{{ lookup('pipe', 'ssh-keyscan -trsa ' + ip_address) }}" - name: Build Cluster - command: '/usr/local/bin/rke up --config=/oas/control/local/rke/cluster.yml &>> /oas/logs/rke.log' + shell: /usr/local/bin/rke up --config=/oas/control/local/rke/cluster.yml >> /oas/logs/rke.log + +- name: Fetch /oas/logs/rke.log from cluster + fetch: + src: /oas/logs/rke.log + dest: ./rke.log + flat: yes - name: Ensure /root/.kube directory file: @@ -102,10 +108,3 @@ environment: - KEYCLOAK_PASSWORD: "{{ keycloak_password }}" command: '/usr/local/bin/helmfile -b /snap/bin/helm -e oas -f /oas/source/repos/helmfiles/helmfile.d/ apply' - - -- name: Fetch /oas/logs/rke.log from cluster - fetch: - src: /oas/logs/rke.log - dest: ./rke.log - flat: yes