ansible-edda/playbooks/services.yml

113 lines
3.7 KiB
YAML

---
- name: "services : asgard:&zfs"
hosts: "asgard:&zfs"
tasks:
- name: "datasets : user"
ansible.builtin.include_role:
name: "services/datasets/user"
apply:
tags:
- "services:{{ services_service_name }}"
- "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"
roles:
- role: "services/setup/system"
tags:
- "services:setup"
- "services:setup:system"
tasks:
- name: "setup : user"
ansible.builtin.include_role:
name: "services/setup/user"
apply:
tags:
- "services:{{ services_service_name }}"
- "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"
- name: "deploy"
ansible.builtin.include_role:
name: "services/deploy/{{ services_service_name }}"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:deploy"
- "services:deploy:{{ services_service_name }}"
- "services:{{ services_service_name }}:deploy"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"
- name: "services : asgard:&zfs"
hosts: "asgard:&zfs"
tasks:
- name: "datasets : backups : user"
ansible.builtin.include_role:
name: "services/datasets/backups/user"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:datasets"
- "services:datasets:backups"
- "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"
tags: "always"
- name: "backups : snapshots"
ansible.builtin.include_role:
name: "services/backups/snapshots"
apply:
tags:
- "services:{{ services_service_name }}"
- "services:backups"
- "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 : asgard:&restic"
hosts: "asgard:&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"
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
loop_control:
loop_var: "services_service_name"
tags: "always"