No need to specify file in dict
This commit is contained in:
parent
123276b3de
commit
9bae994269
|
@ -5,21 +5,17 @@ base_volume: "{{ hdd_mount_point }}/apps"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
caddy:
|
caddy:
|
||||||
file: caddy.yml
|
|
||||||
volume: "{{ base_volume }}/caddy"
|
volume: "{{ base_volume }}/caddy"
|
||||||
version: 2-alpine
|
version: 2-alpine
|
||||||
|
|
||||||
watchtower:
|
watchtower:
|
||||||
file: watchtower.yml
|
|
||||||
version: arm64v8-1.5.1
|
version: arm64v8-1.5.1
|
||||||
|
|
||||||
restic:
|
restic:
|
||||||
file: restic.yml
|
|
||||||
repo: /restic
|
repo: /restic
|
||||||
version: 1.6
|
version: 1.6
|
||||||
|
|
||||||
nextcloud:
|
nextcloud:
|
||||||
file: nextcloud.yml
|
|
||||||
domain: "cloud.{{ base_domain }}"
|
domain: "cloud.{{ base_domain }}"
|
||||||
volume: "{{ base_volume }}/nextcloud"
|
volume: "{{ base_volume }}/nextcloud"
|
||||||
version: 25-apache
|
version: 25-apache
|
||||||
|
@ -27,23 +23,19 @@ services:
|
||||||
redis_version: 7-alpine
|
redis_version: 7-alpine
|
||||||
|
|
||||||
emby:
|
emby:
|
||||||
file: emby.yml
|
|
||||||
domain: "watch.{{ base_domain }}"
|
domain: "watch.{{ base_domain }}"
|
||||||
volume: "{{ base_volume }}/emby"
|
volume: "{{ base_volume }}/emby"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
monerod:
|
monerod:
|
||||||
file: monerod.yml
|
|
||||||
domain: "xmr.{{ base_domain }}"
|
domain: "xmr.{{ base_domain }}"
|
||||||
version: latest
|
version: latest
|
||||||
|
|
||||||
wireguard:
|
wireguard:
|
||||||
file: wireguard.yml
|
|
||||||
domain: "wg01.vpn.{{ base_domain }}"
|
domain: "wg01.vpn.{{ base_domain }}"
|
||||||
volume: "{{ base_volume }}/wireguard"
|
volume: "{{ base_volume }}/wireguard"
|
||||||
port: 51820
|
port: 51820
|
||||||
version: arm64v8-alpine
|
version: arm64v8-alpine
|
||||||
|
|
||||||
snowflake:
|
snowflake:
|
||||||
file: snowflake.yml
|
|
||||||
version: latest
|
version: latest
|
||||||
|
|
|
@ -25,13 +25,11 @@
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Deploy services
|
- name: Deploy services
|
||||||
include_tasks: "services/{{ item.service.file }}"
|
include_tasks: "services/{{ item.service }}.yml"
|
||||||
loop: "{{ services | dict2items(value_name='service') }}"
|
loop: "{{ services | dict2items(key_name='service') }}"
|
||||||
when: single_service is not defined and
|
when: single_service is not defined
|
||||||
item.service.file is defined
|
|
||||||
|
|
||||||
- name: Deploy single service
|
- name: Deploy single service
|
||||||
include_tasks: "services/{{ services[single_service].file }}"
|
include_tasks: "services/{{ single_service }}.yml"
|
||||||
when: single_service is defined and
|
when: single_service is defined and
|
||||||
single_service in services and
|
single_service in services
|
||||||
services[single_service].file is defined
|
|
||||||
|
|
Reference in a new issue