From 2cf10f848d69a96b606a42a7f8946a1ad158b16f Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 22 Oct 2023 10:44:01 +0200 Subject: [PATCH] Use BACKUP_WORKFLOW variable to determine what to do. --- launch.sh | 2 +- tasks/start.yml | 2 +- vars/main.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/launch.sh b/launch.sh index 56bcd0c..dfff98f 100755 --- a/launch.sh +++ b/launch.sh @@ -6,4 +6,4 @@ SCRIPTPATH=$(dirname $SCRIPT) cd $SCRIPTPATH USER=$(whoami) -sudo -E docker run --net=host --rm -e KEY -e DOC_KEY -e SECRETS_ARCHIVE_PASSPHRASE -e DUPLICITY_PASSPHRASE -e SCRIPT -v $SCRIPTPATH:/root/duplicity_playbooks -i ansible /root/duplicity_playbooks/script.sh +sudo -E docker run --net=host --rm -e KEY -e DOC_KEY -e SECRETS_ARCHIVE_PASSPHRASE -e DUPLICITY_PASSPHRASE -e BACKUP_WORKFLOW -v $SCRIPTPATH:/root/duplicity_playbooks -i ansible /root/duplicity_playbooks/script.sh diff --git a/tasks/start.yml b/tasks/start.yml index 684d7fd..d368359 100755 --- a/tasks/start.yml +++ b/tasks/start.yml @@ -230,7 +230,7 @@ image: "duplicity:{{ tag }}" entrypoint: - "ansible-playbook" - - "/root/duplicity_playbooks/gen_bootstrap.yml" + - "/root/duplicity_playbooks/{{ lookup('env','BACKUP_WORKFLOW') }}.yml" output_logs: true detach: false network_mode: host diff --git a/vars/main.yml b/vars/main.yml index 3952bb2..6c9e320 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -31,6 +31,7 @@ PLAYBOOK_REQUIRED_ENV_VARS: - DOC_KEY - SECRETS_ARCHIVE_PASSPHRASE - DUPLICITY_PASSPHRASE + - BACKUP_WORKFLOW DUPLICITY_ENVIRONMENT: SWIFT_AUTHURL: "{{ lookup('env','OS_AUTH_URL') }}"