diff --git a/scripts/deploy_containers.sh b/scripts/deploy_containers.sh index c46858b..d1e32ef 100644 --- a/scripts/deploy_containers.sh +++ b/scripts/deploy_containers.sh @@ -1,15 +1,16 @@ #!/bin/bash # all new/updated tasks in the diff -echo $1 $2 - new_tasks=($(git diff --name-only $1 $2 | grep '\.yml$')) +echo $new_tasks +echo $1 $2 if [ ! -z "$new_tasks" ]; then for task in "${new_tasks[@]}"; do - ansible_tag=$(echo "$task" | awk '{print $2}') + ansible_tag=$(echo "$task" | awk -F/ '{print $2}') if [[ "$tag" != "all.yml" && "$tag" != "all.template.yml" && "$tag" != "main.yml" ]] ; then - tag=${tag%.*}_deploy + tag=${ansible_tag%.*}_deploy + echo $tag ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_pass.txt fi done diff --git a/tasks/cup.yml b/tasks/cup.yml index 1a4fc5b..1465f3b 100644 --- a/tasks/cup.yml +++ b/tasks/cup.yml @@ -10,5 +10,3 @@ - name: homelab volumes: - "/var/run/docker.sock:/var/run/docker.sock:ro" - env: - - DUMMY_ENV: "dummy_env"