aboutsummaryrefslogtreecommitdiff
path: root/ansible/playbooks
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2023-08-11 16:28:54 +0000
committerKumar Damani <me@kumardamani.net>2023-08-11 16:28:54 +0000
commita8a40383081441ebd3757a501364b9ac45eb421e (patch)
treef48b7040615af1bda263faa4d2657636c77ba2a4 /ansible/playbooks
parent9bae899e227e4899a5ee629bf305a00a39044bc2 (diff)
parent1f321db8949b3aeb80afdd7a94e92b7743c3e275 (diff)
Merge branch 'work' into 'main'
Work See merge request kdam0/home-lab!1
Diffstat (limited to 'ansible/playbooks')
-rw-r--r--ansible/playbooks/init.yaml98
1 files changed, 98 insertions, 0 deletions
diff --git a/ansible/playbooks/init.yaml b/ansible/playbooks/init.yaml
new file mode 100644
index 0000000..7e4029f
--- /dev/null
+++ b/ansible/playbooks/init.yaml
@@ -0,0 +1,98 @@
+---
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=vault
+- name: 'Deploy Vault'
+ hosts: 'vault'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'docker'
+ - role: 'vault'
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_vault_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+ caddy_add_upstream_port: 8989
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=torrents
+- name: 'Deploy Transmission'
+ hosts: 'torrents'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'torrents'
+ vars:
+ torrents_nas_mount_path: '{{ vaultvar_torrents_nas_nfs_path }}'
+ torrents_rpc_username: '{{ vaultvar_torrents_rpc_username }}'
+ torrents_rpc_password: '{{ vaultvar_torrents_rpc_password }}'
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_torrents_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=med_dl
+- name: 'Deploy Media Downloaders'
+ hosts: 'med-dl'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'docker'
+ - role: 'med_dl'
+ vars:
+ med_dl_nas_mount_path: '{{ vaultvar_med_dl_nas_nfs_path }}'
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_sonarr_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+ caddy_add_upstream_port: 8989
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_radarr_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+ caddy_add_upstream_port: 7878
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=nextcloud
+- name: 'Deploy Nextcloud'
+ hosts: 'nc'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'docker'
+ - role: 'nextcloud'
+ vars:
+ nextcloud_nas_mount_path: '{{ vaultvar_nextcloud_nas_nfs_path }}'
+ nextcloud_php_max_mem_mb: 8000
+ nextcloud_php_max_upload_size_gb: 10
+ # You should have DRI devices showing up in your container in `/dev/dri/`.
+ # See the TF readme for steps to enable this.
+ # If not, then set this to false here.
+ # Leave this as a yaml string, it is going to used as a shell var.
+ nextcloud_enable_dri: 'true'
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_nextcloud_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+ caddy_add_upstream_port: 11000
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=plex
+- name: 'Deploy Plex'
+ hosts: 'plex'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'plex'
+ vars:
+ plex_nas_mount_path: '{{ vaultvar_plex_nas_nfs_path }}'
+
+# ansible-playbook -u root -i 'hosts' --vault-id vaultkey playbooks/init.yaml --tags=monitoring
+- name: 'Deploy Prometheus'
+ hosts: 'monitoring'
+ gather_facts: false
+ roles:
+ - role: 'base'
+ - role: 'monitoring'
+ - role: 'caddy_add'
+ vars:
+ caddy_add_hosts: ['{{ vaultvar_metrics_cname }}.{{ vaultvar_root_domain }}']
+ caddy_add_upstream_host: '{{ inventory_hostname }}'
+ caddy_add_upstream_port: 9090