Cleanup playbooks
This commit is contained in:
parent
89909cd6ae
commit
eb76c93ae5
3 changed files with 10 additions and 44 deletions
|
@ -19,8 +19,14 @@ container_registry:
|
||||||
|
|
||||||
services_path: /opt/services/
|
services_path: /opt/services/
|
||||||
|
|
||||||
|
common_services:
|
||||||
|
- always
|
||||||
|
- backup
|
||||||
|
- lego
|
||||||
|
- caddy
|
||||||
|
- watchtower
|
||||||
|
|
||||||
caddy_path: "{{ (services_path, 'caddy') | path_join }}"
|
caddy_path: "{{ (services_path, 'caddy') | path_join }}"
|
||||||
caddy_config_path: "{{ (caddy_path, 'config', 'conf.d') | path_join }}"
|
caddy_config_path: "{{ (caddy_path, 'config', 'conf.d') | path_join }}"
|
||||||
managed_sites: []
|
|
||||||
|
|
||||||
certificates_path: "{{ (services_path, '_certificates') | path_join }}"
|
certificates_path: "{{ (services_path, '_certificates') | path_join }}"
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
- name: Run roles for local-dev
|
|
||||||
vars:
|
|
||||||
# Remove inventory
|
|
||||||
base_path: "{{ inventory_dir.split('/')[0:-1] | join('/') }}"
|
|
||||||
services_path: "{{ (base_path, '_services') | path_join }}"
|
|
||||||
caddy_config_path: "{{ (services_path, 'caddy', 'config', 'conf.d') | path_join }}"
|
|
||||||
|
|
||||||
hosts: local-dev
|
|
||||||
roles:
|
|
||||||
- common
|
|
||||||
|
|
||||||
- acme-dns
|
|
||||||
- faas
|
|
||||||
- forgejo
|
|
||||||
- forgejo-runner
|
|
||||||
- healthcheck
|
|
||||||
- homebox
|
|
||||||
- influxdb
|
|
||||||
- jellyfin
|
|
||||||
- tandoor
|
|
||||||
- telegraf
|
|
||||||
- tinytinyrss
|
|
||||||
- umami
|
|
||||||
- uptime-kuma
|
|
||||||
- watchtower
|
|
||||||
- wiki-js
|
|
|
@ -1,6 +1,8 @@
|
||||||
---
|
---
|
||||||
- name: Run all roles
|
- name: Run all roles
|
||||||
hosts: serguzim_net
|
hosts: serguzim_net
|
||||||
|
vars:
|
||||||
|
host_services: "{{ all_services | my_service_attributes(inventory_hostname) | union(common_services) }}"
|
||||||
tasks:
|
tasks:
|
||||||
- name: Install software
|
- name: Install software
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
|
@ -10,28 +12,13 @@
|
||||||
tags: software
|
tags: software
|
||||||
when: "inventory_hostname == 'node003'"
|
when: "inventory_hostname == 'node003'"
|
||||||
|
|
||||||
- name: Include common roles
|
|
||||||
ansible.builtin.include_role:
|
|
||||||
name: "{{ services_item }}"
|
|
||||||
apply:
|
|
||||||
tags: "{{ services_item }}"
|
|
||||||
tags: always
|
|
||||||
loop:
|
|
||||||
- always
|
|
||||||
- backup
|
|
||||||
- lego
|
|
||||||
- caddy
|
|
||||||
- watchtower
|
|
||||||
loop_control:
|
|
||||||
loop_var: services_item
|
|
||||||
|
|
||||||
- name: Include service roles
|
- name: Include service roles
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: "{{ services_item }}"
|
name: "{{ services_item }}"
|
||||||
apply:
|
apply:
|
||||||
tags: "{{ services_item }}"
|
tags: "{{ services_item }}"
|
||||||
tags: always
|
tags: always
|
||||||
loop: "{{ all_services | my_service_attributes(inventory_hostname) }}"
|
loop: "{{ host_services }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: services_item
|
loop_var: services_item
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue