From 9f07937682de627de687ddfcdb3fac4d7925578c Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Tue, 29 Jul 2025 23:20:29 -0400 Subject: [PATCH] only run playbook when tag is present --- scripts/deploy_containers.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/deploy_containers.sh b/scripts/deploy_containers.sh index f68a9dc..e914e3d 100644 --- a/scripts/deploy_containers.sh +++ b/scripts/deploy_containers.sh @@ -10,10 +10,11 @@ if [ ! -z "$new_tasks" ]; then for task in "${new_tasks[@]}"; do ansible_tag=$(echo "$task" | awk -F/ '{print $2}') - if [[ "$tag" != "all.yml" && "$tag" != "all.template.yml" && "$tag" != "main.yml" ]] ; then + if [[ "$ansible_tag" != "all.yml" && "$ansible_tag" != "all.template.yml" && "$ansible_tag" != "main.yml" ]] ; then tag=${ansible_tag%.*}_deploy - echo $tag - ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_pass.txt + if [[ "$tag" != "_deploy" ]] ; then + ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_pass.txt + fi fi done fi \ No newline at end of file