From 1a6356a44a019fd25fe45f4864e7a84d33a58f7c Mon Sep 17 00:00:00 2001 From: Beth Date: Sat, 5 Oct 2024 18:50:14 -0500 Subject: [PATCH] update --- build_ansible.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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`