updated build_ansible.sh and privtorrents template to include ansible tags

This commit is contained in:
Beth Parker 2024-12-25 22:42:19 -06:00
parent d1f0aa8848
commit 88f7f7ed55
2 changed files with 14 additions and 6 deletions

View file

@ -89,7 +89,15 @@ do
echo "issue grabbing role $role - dir/file count less than 9, exiting" echo "issue grabbing role $role - dir/file count less than 9, exiting"
exit exit
fi fi
echo " - ${elements[1]}" >> /ansible/new/$fqdn.yml
#get tags and add role
if [ -n "${elements[3]}" ];then
tags="\"${elements[3]//,/\",\"}\""
echo " - { role: ${elements[1]}, tags: [${tags}] }" >> /ansible/new/$fqdn.yml
else
echo " - ${elements[1]}" >> /ansible/new/$fqdn.yml
fi
# retrieve var file if it exists # retrieve var file if it exists
curl -k "https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/var_files/${elements[1]}/$fqdn" -H "accept: application/raw" -o /tmp/main.yml curl -k "https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/var_files/${elements[1]}/$fqdn" -H "accept: application/raw" -o /tmp/main.yml

View file

@ -1,7 +1,7 @@
role:core:testing role:core:v1.0:core
role:mount:testing role:mount:v1.0:core,mount
role:deluge:testing role:deluge:v1.0:workload,deluge
role:nginx-ssl:testing role:nginx-ssl:v1.0:common,nginx-ssl
role:certbot:testing role:certbot:v1.0:common,certbot
# end of file # end of file