diff --git a/playbooks/k8s/install_kubectl.yml b/playbooks/k8s/install_kubectl.yml index 6f34cb2..660f581 100644 --- a/playbooks/k8s/install_kubectl.yml +++ b/playbooks/k8s/install_kubectl.yml @@ -36,3 +36,17 @@ ansible.builtin.apt: name: kubectl update_cache: true + + + - name: does argocd exists + ansible.builtin.stat: + path: /usr/local/bin/argocd + register: st + - name: install argocd + ansible.builtin.shell: | + VERSION=$(curl -L -s https://raw.githubusercontent.com/argoproj/argo-cd/stable/VERSION) + curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/download/v$VERSION/argocd-linux-amd64 + sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd + rm argocd-linux-amd64 + when: st.stat.exists != true +