diff --git a/build_ansible.sh b/build_ansible.sh index d116e18..407c93f 100644 --- a/build_ansible.sh +++ b/build_ansible.sh @@ -89,7 +89,15 @@ do echo "issue grabbing role $role - dir/file count less than 9, exiting" exit 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 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 diff --git a/playbook_templates/privtorrents.actcur.com b/playbook_templates/privtorrents.actcur.com index 54c2a17..bad8373 100644 --- a/playbook_templates/privtorrents.actcur.com +++ b/playbook_templates/privtorrents.actcur.com @@ -1,7 +1,7 @@ -role:core:testing -role:mount:testing -role:deluge:testing -role:nginx-ssl:testing -role:certbot:testing +role:core:v1.0:core +role:mount:v1.0:core,mount +role:deluge:v1.0:workload,deluge +role:nginx-ssl:v1.0:common,nginx-ssl +role:certbot:v1.0:common,certbot # end of file \ No newline at end of file