Skip to content

Commit

Permalink
Kinda hate everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndouglas committed Jun 22, 2024
1 parent 07df967 commit a7db356
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 18 deletions.
1 change: 0 additions & 1 deletion .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ profile: 'production'
# option are parsed relative to the CWD of execution.
exclude_paths:
- roles/geerlingguy*
- kubespray/*

# Enforce variable names to follow pattern below, in addition to Ansible own
# requirements, like avoiding python identifiers. To disable add `var-naming`
Expand Down
6 changes: 3 additions & 3 deletions ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
nocows = 1
vault_password_file = ~/.goldentooth_vault_password
inventory = ./inventory
roles_path = ./roles:~/.ansible/roles:./kubespray/roles/
roles_path = ./roles:~/.ansible/roles
callbacks_enabled = profile_tasks
stdout_callback = yaml
stderr_callback = yaml
pipelining = true
ssh_args = -o ControlMaster=auto -o ControlPersist=3600s -o PreferredAuthentications=publickey
control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
forks = 10
library = ./library/:./kubespray/library/
playbook_dir = ./playbooks/:./kubespray/playbooks/
library = ./library/
playbook_dir = ./playbooks/

[ssh_connection]
scp_if_ssh = true
4 changes: 0 additions & 4 deletions inventory/group_vars/all/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,3 @@ security_autoupdate_mail_on_error: true

# Don't worry about `fail2ban` for now.
security_fail2ban_enabled: true

# Kubespray
# #############################################################################
# See `kubespray/vars.yaml`.
8 changes: 4 additions & 4 deletions inventory/hosts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ all:
control_plane:
hosts:
bettley:
fenn:
gardener:
worker:
hosts:
cargyll:
dalt:
worker:
hosts:
erenford:
fenn:
gardener:
harlton:
inchfield:
jast:
2 changes: 1 addition & 1 deletion roles/goldentooth.bootstrap_k8s/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
src: '/etc/kubernetes/admin.conf'
dest: '~/.kube/config'
state: 'link'
mode: '0644'
mode: '0600'

- name: 'Configure Calico networking.'
ansible.builtin.command:
Expand Down
2 changes: 1 addition & 1 deletion roles/goldentooth.install_argocd/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Argo CD chart version.
argocd_chart_version: '6.6.0'
argocd_chart_version: '7.1.5'

# Argo CD chart repository URL.
argocd_chart_repo_url: 'https://argoproj.github.io/argo-helm'
Expand Down
14 changes: 12 additions & 2 deletions roles/goldentooth.install_argocd/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
dest: '/usr/local/bin/argocd'
mode: '0555'

- name: 'Create the Argo CD namespace.'
kubernetes.core.k8s:
state: 'present'
definition:
apiVersion: 'v1'
kind: 'Namespace'
metadata:
name: 'argocd'
run_once: true

- name: 'Create a Kubernetes secret for the GitHub token.'
kubernetes.core.k8s:
state: 'present'
Expand All @@ -30,13 +40,13 @@

- name: 'Install Argo CD from Helm chart.'
kubernetes.core.helm:
atomic: true
atomic: false
chart_ref: 'argo/argo-cd'
chart_version: "{{ argocd_chart_version }}"
create_namespace: true
release_name: 'argocd'
release_namespace: 'argocd'
release_values: "{{ argocd_release_values }}"
update_repo_cache: true
wait: true
wait: false
run_once: true
2 changes: 1 addition & 1 deletion roles/goldentooth.install_argocd_apps/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: 'Create Argo CD AppProject resources.'
ansible.builtin.include_tasks: "{{ project_file }}"
loop:
- 'app_projects/generic.yaml'
- 'app_projects/gitops_repo.yaml'
loop_control:
loop_var: 'project_file'

Expand Down
2 changes: 1 addition & 1 deletion roles/goldentooth.install_helm/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
ansible.builtin.apt:
name:
- 'helm'
state: 'present'
state: 'latest'
cache_valid_time: 3600

0 comments on commit a7db356

Please sign in to comment.