diff --git a/build_ansible.sh b/build_ansible.sh index b58dd0f..292a363 100644 --- a/build_ansible.sh +++ b/build_ansible.sh @@ -87,16 +87,15 @@ do git clone -b ${elements[2]} --depth 1 https://git.actcur.com/actcur-ansible/role-${elements[1]}.git /ansible/new/roles/${elements[1]} # verify branch was cloned successfully - count=`ls /new/$role/ | wc -l` - if [[ $count -lt 9 ]];then + count=`ls /ansible/new/roles/${elements[1]}/ | wc -l` + if [[ $count -lt 5 ]];then echo "issue grabbing role $role - dir/file count less than 9, exiting" exit fi - mv /tmp/roles/${elements[0]} /ansible/new/roles echo " - nginx-ssl" >> /ansible/new/$fqdn.yml # retrieve var file if it exists - curl -k "https://git.actcur.com/actcur-ansible/playbook-builder/raw/branch/$branch/var_files/${elements[0]}/$fqdn" -H "accept: application/raw" -o /ansible/new/roles/vars/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 /ansible/new/roles/${element[1]/vars/main.yml # verifty file was downloaded successfully count=`grep -P "(---)|(end of file)" /tmp/build_ansible.sh | wc -l`