138 lines
5.2 KiB
YAML
138 lines
5.2 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: "backups/snapshots/user"
|
|
apply:
|
|
tags:
|
|
- "services:{{ services_service_name }}"
|
|
- "services:backups"
|
|
- "services:backups:snapshots"
|
|
- "services:backups:snapshots:user"
|
|
- "services:backups:snapshots:user:{{ services_service_name }}"
|
|
- "services:{{ services_service_name }}:backups:snapshots:user"
|
|
vars:
|
|
backups_snapshots_user_name: "\
|
|
{{ services_backups_snapshots_services[services_service_name].user_name }}"
|
|
backups_snapshots_user_data_dataset: "\
|
|
{{ services_backups_snapshots_services[services_service_name].data_dataset }}"
|
|
backups_snapshots_user_backup_dataset: "\
|
|
{{ services_backups_snapshots_services[services_service_name].backup_dataset }}"
|
|
backups_snapshots_user_recursive: "\
|
|
{{ services_backups_snapshots_services[services_service_name].recursive }}"
|
|
backups_snapshots_user_skip_parent: "\
|
|
{{ services_backups_snapshots_services[services_service_name].skip_parent }}"
|
|
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: "backups/restic/user"
|
|
apply:
|
|
tags:
|
|
- "services:{{ services_service_name }}"
|
|
- "services:backups"
|
|
- "services:backups:restic:user"
|
|
- "services:backups:restic:user:{{ services_service_name }}"
|
|
- "services:{{ services_service_name }}:backups:restic:user"
|
|
vars:
|
|
backups_restic_user_name: "\
|
|
{{ services_backups_restic_services[services_service_name].user_name }}"
|
|
backups_restic_user_use_dataset: "{{ 'zfs' in group_names }}"
|
|
backups_restic_user_data_dataset: "\
|
|
{{ services_backups_restic_services[services_service_name].data_dataset | default('') }}"
|
|
backups_restic_user_data_directory: "\
|
|
{{ services_backups_restic_services[services_service_name].data_directory }}"
|
|
backups_restic_user_data_exclude_list: "\
|
|
{{ services_backups_restic_services[services_service_name].exclude }}"
|
|
backups_restic_user_aws_bucket_prefix: "\
|
|
{{ services_backups_restic_services[services_service_name].aws_bucket_prefix }}"
|
|
loop: "{{ services_host_services | dict2items | map(attribute='key') }}"
|
|
when: "services_host_services[services_service_name].restic"
|
|
loop_control:
|
|
loop_var: "services_service_name"
|
|
tags: "always"
|