Skip to content

karlazzampersonal/ansible-argocd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbook: Ansible-argocd

Description

  • Install ArgoCD and its image updater service
ansible-vault encrypt inventory/group_vars/argocd.yml
ansible-playbook -i inventory/local.ini playbook/provision.yml --ask-vault-pass
  • Remove ArgoCD
ansible-vault encrypt inventory/group_vars/argocd.yml
ansible-playbook -i inventory/local.ini playbook/destroy.yml --ask-vault-pass

Requirements

  • Python3 and pip installed on your machine
  • Make sure you have your DNS A record created for argo.local.example.com pointed to 198.168.1.60

Linting and syntax-check

You can run yamllint to lint your yaml via

yamllint .

You can run syntax-check to verify the playbook's imports via

ansible-playbook playbook/playbook.yml --syntax-check

Configuration

  • Inventory File:
  • inventory/local.ini Used for installing ArgoCD
[argocd]
localhost
  • Variables: inventory/group_vars.yml
    • argocd.yml - This file is encrypted, used for ArgoCD playbook, example config below.
    ---
    # needed to tell ansible we are not ssh'ing and just running locally
    ansible_connection: local
    
    # variables
    ingress_subdomain: "argo.local.example.com"
    argo_cd_password: "password123"
  • Playbooks: playbook/*.yml
    • provision.yml is the playbook to run to add ArgoCD.
    • destroy.yml is the playbook to run to remove ArgoCD.
  • roles: roles/{rolename}
    • argocd_prereq- Role to run before installing ArgoCD. Installs Brew, Helm, ArgoCD
    • argocd- Role to run to install ArgoCD
    • reset- Role to destroy argocd

Extra config

Allow kubectl from local machine

mkdir -p ~/.kube
scp [email protected]:~/.kube/config ~/.kube/config

About

ArgoCD playbook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages