ansible-edda/playbooks/services.yml

127 lines
4.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:
2022-12-18 19:36:21 +01:00
- role: "services/datasets/system"
2022-12-18 19:49:55 +01:00
tags:
- "services:datasets"
- "services:datasets:system"
2022-12-16 22:16:23 +01:00
tasks:
2022-12-18 19:49:55 +01:00
- name: "datasets : user"
ansible.builtin.include_role:
2022-12-18 19:36:21 +01:00
name: "services/datasets/user"
apply:
tags:
2022-12-14 21:20:00 +01:00
- "services:{{ services_service_name }}"
2022-12-18 19:49:55 +01:00
- "services:datasets"
- "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:
2022-12-18 19:36:21 +01:00
- role: "services/setup/system"
2022-12-18 19:49:55 +01:00
tags:
- "services:setup"
- "services:setup:system"
2022-12-16 22:16:23 +01:00
tasks:
2022-12-18 19:49:55 +01:00
- name: "setup : user"
ansible.builtin.include_role:
2022-12-18 19:36:21 +01:00
name: "services/setup/user"
apply:
tags:
2022-12-14 21:20:00 +01:00
- "services:{{ services_service_name }}"
2022-12-18 19:49:55 +01:00
- "services:setup"
- "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-18 19:36:21 +01:00
name: "services/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:
2022-12-18 19:36:21 +01:00
- role: "services/datasets/backups/system"
2022-12-18 01:38:30 +01:00
when: the_nine_worlds_production | bool
2022-12-18 19:49:55 +01:00
tags:
- "services:datasets"
- "services:datasets:backups"
- "services:datasets:backups:system"
2022-12-18 01:38:30 +01:00
2022-12-18 00:44:32 +01:00
tasks:
2022-12-18 19:49:55 +01:00
- name: "datasets : backups : user"
2022-12-18 01:38:30 +01:00
ansible.builtin.include_role:
2022-12-18 19:36:21 +01:00
name: "services/datasets/backups/user"
2022-12-18 01:38:30 +01:00
apply:
tags:
- "services:{{ services_service_name }}"
2022-12-18 19:49:55 +01:00
- "services:datasets"
- "services:datasets:backups"
- "services:datasets:backups:user"
- "services:datasets:backups:user:{{ services_service_name }}"
- "services:{{ services_service_name }}:datasets:backups:user"
2022-12-18 01:38:30 +01:00
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"
2023-02-12 16:37:48 +01:00
- name: "backups : snapshots"
2022-12-18 00:44:32 +01:00
ansible.builtin.include_role:
2023-02-12 16:37:48 +01:00
name: "services/backups/snapshots"
2022-12-18 00:44:32 +01:00
apply:
tags:
- "services:{{ services_service_name }}"
- "services:backups"
2023-02-12 16:37:48 +01:00
- "services:backups:snapshots"
- "services:backups:snapshots:{{ services_service_name }}"
- "services:{{ services_service_name }}:backups:snapshots"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"
- name: "services : restic"
hosts: "restic"
tasks:
- name: "backups : restic"
ansible.builtin.include_role:
name: "services/backups/restic"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:backups"
- "services:backups:restic"
- "services:backups:restic:{{ services_service_name }}"
- "services:{{ services_service_name }}:backups:restic"
2022-12-18 00:44:32 +01:00
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
2022-12-18 01:38:30 +01:00
tags: "always"