Refactor all_services to remove name attribute
This commit is contained in:
parent
6f9f888478
commit
1d14ac888e
16 changed files with 42 additions and 71 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 | map(attribute='name')) }}"
|
||||
unused_services: "{{ docker_compose_projects_result.stdout_lines | difference(host_services | services_names()) }}"
|
||||
|
|
|
@ -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: "{{ host_services | map(attribute='name') | list_prefix_path_suffix(caddy_config_path, '.conf') }}"
|
||||
caddy_site_configs_want: "{{ host_services | services_names() | 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