Refactor services-to-host-mapping and playbooks

This commit is contained in:
Tobias Reisinger 2024-10-03 00:50:21 +02:00
parent 825393bbd3
commit a8e14b53f5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 142 additions and 108 deletions
roles
backup/vars
caddy/vars
vikunja/tasks

View file

@ -5,7 +5,8 @@ backup_image: "{{ (container_registry.public, 'services/backup') | path_join }}"
backup_svc:
name: backup
backup_volumes_service: "{{ host_backup.volumes | map_backup_volumes_service }}"
backup_volumes_list: "{{ all_services | my_service_attributes(host_services, 'volumes_backup') }}"
backup_volumes_service: "{{ backup_volumes_list | map_backup_volumes_service }}"
backup_env:
HC_UID: "{{ host_backup.hc_uid }}"
@ -56,4 +57,4 @@ backup_compose:
devices:
- /dev/fuse
volumes: "{{ host_backup.volumes | map_backup_volumes }}"
volumes: "{{ backup_volumes_list | map_backup_volumes }}"

View file

@ -9,6 +9,7 @@ caddy_ports_default:
- 443:443
- 443:443/udp
- "{{ host_vpn.ip }}:2019:2019"
caddy_ports_extra: "{{ all_services | my_service_attributes(host_services, 'ports') }}"
caddy_ports: "{{ caddy_ports_default | union(caddy_ports_extra) }}"
caddy_svc:

View file

@ -15,7 +15,7 @@
ansible.builtin.template:
src: yml.j2
dest: "{{ (service_path, 'config.yml') | path_join }}"
mode: "0600"
mode: "0644"
register: cmd_result
- name: Set the docker force-recreate flag