ansible-edda/plays/services/main.yml

98 lines
3.0 KiB
YAML
Raw Normal View History

2022-12-12 23:49:20 +01:00
---
- name: "services : zfs"
hosts: "zfs"
2022-12-16 22:16:23 +01:00
roles:
- role: "datasets/system"
2022-12-14 21:20:00 +01:00
tags: "services:datasets_system"
2022-12-16 22:16:23 +01:00
tasks:
- name: "datasets_user"
ansible.builtin.include_role:
2022-12-14 21:38:18 +01:00
name: "datasets/user"
apply:
tags:
2022-12-14 21:20:00 +01:00
- "services:{{ services_service_name }}"
- "services:datasets_user"
- "services:datasets_user:{{ services_service_name }}"
- "services:{{ services_service_name }}:datasets_user"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"
- name: "services : asgard"
hosts: "asgard"
2022-12-16 22:16:23 +01:00
roles:
- role: "setup/system"
tags: "services:setup_system"
2022-12-16 22:16:23 +01:00
tasks:
- name: "setup_user"
ansible.builtin.include_role:
2022-12-14 21:38:18 +01:00
name: "setup/user"
apply:
tags:
2022-12-14 21:20:00 +01:00
- "services:{{ services_service_name }}"
- "services:setup_user"
- "services:setup_user:{{ services_service_name }}"
- "services:{{ services_service_name }}:setup_user"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"
2022-12-16 21:49:50 +01:00
- name: "deploy"
ansible.builtin.include_role:
2022-12-17 00:15:10 +01:00
name: "deploy/{{ services_service_name }}"
2022-12-16 21:49:50 +01:00
apply:
tags:
- "services:{{ services_service_name }}"
- "services:deploy"
- "services:deploy:{{ services_service_name }}"
- "services:{{ services_service_name }}:deploy"
2022-12-17 00:15:10 +01:00
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
2022-12-17 00:09:05 +01:00
tags: "always"
2022-12-18 00:44:32 +01:00
- name: "services : yggdrasil"
hosts: "yggdrasil"
2022-12-18 01:38:30 +01:00
roles:
- role: "datasets/backups/system"
when: the_nine_worlds_production | bool
tags: "services:datasets_backups_system"
2022-12-18 00:44:32 +01:00
tasks:
2022-12-18 01:38:30 +01:00
- name: "datasets_backups_user"
ansible.builtin.include_role:
name: "datasets/backups/user"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:datasets_backups_user"
- "services:datasets_backups_user:{{ services_service_name }}"
- "services:{{ services_service_name }}:datasets_backups_user"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
when: the_nine_worlds_production | bool
tags: "always"
2022-12-18 00:44:32 +01:00
- name: "backups"
ansible.builtin.include_role:
name: "backups"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:backups"
- "services:backups:{{ services_service_name }}"
- "services:{{ services_service_name }}:backups"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
when: the_nine_worlds_production | bool
2022-12-18 01:38:30 +01:00
tags: "always"