testing #1

Merged
ejparker merged 9 commits from testing into prod 2024-12-25 22:44:34 -06:00
Showing only changes of commit 1a6356a44a - Show all commits

View file

@ -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`