This commit is contained in:
Víðir Valberg Guðmundsson 2022-11-26 00:28:28 +01:00
parent 9b886a8b64
commit 55c9a346b1
3 changed files with 8 additions and 10 deletions

View file

@ -18,7 +18,7 @@ else
$BASE_CMD --tags setup_services
else
echo "Deploying services: $2"
$BASE_CMD --tags setup_services --extra-vars "enabled_services=$2"
$BASE_CMD --tags setup_services --extra-vars "single_service=$2"
fi
;;
"base")

View file

@ -3,12 +3,11 @@
docker_network:
name: external_services
#- name: setup services
# include_tasks: "services/{{ item.value.file }}"
# loop: "{{ services | dict2items }}"
# when: item.key in enabled_services and item.value.file is defined and item.value.disabled_in_vagrant is not defined
- name: setup services
include_tasks: "services/{{ services[item].file }}"
loop: "{{ enabled_services }}"
when: item in services and services[item].file is defined and services[item].disabled_in_vagrant is not defined
include_tasks: "services/{{ item.value.file }}"
loop: "{{ services | dict2items }}"
when: single_service is not defined and item.value.file is defined and item.value.disabled_in_vagrant is not defined
- name: setup single service
include_tasks: "services/{{ services[single_service].file }}"
when: single_service is defined and single_service in services and services[single_service].file is defined and services[single_service].disabled_in_vagrant is not defined

View file

@ -1,6 +1,5 @@
---
- name: Setup restic backup
when: not vagrant
docker_compose:
project_name: restic_backup
pull: true