From d741ed7e953dd52a4b26865cad2ccb215973b188 Mon Sep 17 00:00:00 2001 From: jannfis Date: Mon, 11 Jan 2021 12:15:21 +0100 Subject: [PATCH] Set default namespace when finished --- roles/core-argocd/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/core-argocd/tasks/main.yml b/roles/core-argocd/tasks/main.yml index 8644ab0..da7513d 100644 --- a/roles/core-argocd/tasks/main.yml +++ b/roles/core-argocd/tasks/main.yml @@ -77,9 +77,19 @@ become: yes become_user: vagrant +- name: Wait a little for Argo CD to settle + pause: + seconds: 5 + - name: Perform login to argocd shell: cmd: /usr/local/bin/argocd login --username admin --password admin --insecure {{ argocd.service_ip }} when: argocd.cli.autologin is true become: yes + become_user: vagrant + +- name: Set default namespace in kube context to argocd + shell: + cmd: kubens argocd + become: yes become_user: vagrant \ No newline at end of file