Skip to content

Instantly share code, notes, and snippets.

@x86-39
Last active January 22, 2023 19:45
Show Gist options
  • Save x86-39/2d8a33d945eeb35d8029fa12064fb543 to your computer and use it in GitHub Desktop.
Save x86-39/2d8a33d945eeb35d8029fa12064fb543 to your computer and use it in GitHub Desktop.
Deploy ArgoCD Ansible Playbook
---
- 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