Last active
January 22, 2023 19:45
-
-
Save x86-39/2d8a33d945eeb35d8029fa12064fb543 to your computer and use it in GitHub Desktop.
Deploy ArgoCD Ansible Playbook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Set up ArgoCD | |
hosts: kubernetes_master | |
tasks: | |
- name: Set up ArgoCD | |
environment: | |
KUBECONFIG: "{{ kubeconfig | default('~/.kube/config') }}" | |
block: | |
- name: Install Python Kubernetes module | |
become: true | |
ansible.builtin.pip: | |
name: kubernetes | |
state: present | |
- name: Create ArgoCD namespace | |
kubernetes.core.k8s: | |
state: present | |
definition: | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: argocd | |
labels: | |
name: argocd | |
- name: Download ArgoCD manifest | |
ansible.builtin.get_url: | |
url: https://raw.githubusercontent.com/argoproj/argo-cd/v2.5.6/manifests/install.yaml | |
dest: /tmp/argocd-install.yaml | |
mode: '0644' | |
- name: Install ArgoCD | |
kubernetes.core.k8s: | |
state: present | |
namespace: argocd | |
src: /tmp/argocd-install.yaml | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment