wasn't catching the container tag
All checks were successful
Deploy Containers / Prepare (push) Successful in 10s
All checks were successful
Deploy Containers / Prepare (push) Successful in 10s
This commit is contained in:
@@ -1,15 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# all new/updated tasks in the diff
|
# all new/updated tasks in the diff
|
||||||
echo $1 $2
|
|
||||||
|
|
||||||
new_tasks=($(git diff --name-only $1 $2 | grep '\.yml$'))
|
new_tasks=($(git diff --name-only $1 $2 | grep '\.yml$'))
|
||||||
|
echo $new_tasks
|
||||||
|
echo $1 $2
|
||||||
|
|
||||||
if [ ! -z "$new_tasks" ]; then
|
if [ ! -z "$new_tasks" ]; then
|
||||||
for task in "${new_tasks[@]}"; do
|
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
|
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
|
ansible-playbook main.yml --tags "$tag" --vault-password-file ~/.vault_pass.txt
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@@ -10,5 +10,3 @@
|
|||||||
- name: homelab
|
- name: homelab
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
env:
|
|
||||||
- DUMMY_ENV: "dummy_env"
|
|
||||||
|
Reference in New Issue
Block a user