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
|
@ -2,7 +2,7 @@
|
|||
- name: Run all roles
|
||||
hosts: serguzim_net
|
||||
vars:
|
||||
host_services: "{{ all_services | my_service_attributes(inventory_hostname) | union(common_services) }}"
|
||||
host_services: "{{ all_services | services_for_host(inventory_hostname) }}"
|
||||
tasks:
|
||||
- name: Install software
|
||||
ansible.builtin.include_role:
|
||||
|
@ -21,9 +21,9 @@
|
|||
|
||||
- name: Include service roles
|
||||
ansible.builtin.include_role:
|
||||
name: "{{ services_item }}"
|
||||
name: "{{ services_item.name }}"
|
||||
apply:
|
||||
tags: "{{ services_item }}"
|
||||
tags: "{{ services_item.name }}"
|
||||
tags: always
|
||||
loop: "{{ host_services }}"
|
||||
loop_control:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue