43 lines
1 KiB
YAML
43 lines
1 KiB
YAML
---
|
|
- name: Run all roles
|
|
hosts: serguzim_net
|
|
vars:
|
|
host_services: "{{ all_services | my_service_attributes(inventory_hostname) | union(common_services) }}"
|
|
tasks:
|
|
- name: Install software
|
|
ansible.builtin.include_role:
|
|
name: software
|
|
apply:
|
|
tags: software
|
|
tags: software
|
|
when: "inventory_hostname == 'node003'"
|
|
|
|
- name: Include service roles
|
|
ansible.builtin.include_role:
|
|
name: "{{ services_item }}"
|
|
apply:
|
|
tags: "{{ services_item }}"
|
|
tags: always
|
|
loop: "{{ host_services }}"
|
|
loop_control:
|
|
loop_var: services_item
|
|
|
|
- name: Reload caddy on caddy tag
|
|
ansible.builtin.include_tasks:
|
|
file: tasks/reload-caddy.yml
|
|
apply:
|
|
tags: caddy
|
|
tags:
|
|
- caddy
|
|
- never
|
|
|
|
- name: Stop unused services
|
|
ansible.builtin.include_tasks:
|
|
file: tasks/stop-unused.yml
|
|
apply:
|
|
tags:
|
|
- cleanup
|
|
- always
|
|
tags:
|
|
- cleanup
|
|
- always
|