From c37c1febfcbbcb6e7634bb2514479820b639e228 Mon Sep 17 00:00:00 2001 From: Varac <varac@varac.net> Date: Thu, 7 Mar 2019 22:11:54 +0100 Subject: [PATCH] Propoerly log rke stdout --- ansible/roles/setup/tasks/main.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ansible/roles/setup/tasks/main.yml b/ansible/roles/setup/tasks/main.yml index a2193f2a9..0811c39f1 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 -- GitLab