Remove special handling of common services and refactor getting service attributes
This commit is contained in:
parent
0347efcb38
commit
ff92241ddb
13 changed files with 92 additions and 49 deletions
playbooks/tasks
|
@ -14,4 +14,4 @@
|
|||
|
||||
- name: Set unused services
|
||||
ansible.builtin.set_fact:
|
||||
unused_services: "{{ docker_compose_projects_result.stdout_lines | difference(host_services) }}"
|
||||
unused_services: "{{ docker_compose_projects_result.stdout_lines | difference(host_services | map(attribute='name')) }}"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- name: Map exisiting/wanted caddy site configs
|
||||
ansible.builtin.set_fact:
|
||||
caddy_site_configs_have: "{{ find_result.files | map(attribute='path') }}"
|
||||
caddy_site_configs_want: "{{ all_services | my_service_attributes(inventory_hostname) | list_prefix_path_suffix(caddy_config_path, '.conf') }}"
|
||||
caddy_site_configs_want: "{{ host_services | map(attribute='name') | list_prefix_path_suffix(caddy_config_path, '.conf') }}"
|
||||
|
||||
- name: Remove unwanted caddy site configs
|
||||
ansible.builtin.file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue