You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
414 B
22 lines
414 B
2 years ago
|
#!/bin/sh
|
||
|
## applies all ansible playbooks updated from gitea
|
||
|
|
||
|
set -u
|
||
|
|
||
|
## -- path to the Ansible dirs
|
||
|
ANSBASE=/var/lib/ansible/
|
||
|
|
||
|
echo "$(date +'%F_%R:%S') ==== START ==== "
|
||
|
|
||
|
## -- check each repo in turn
|
||
|
cd ${ANSBASE}
|
||
|
|
||
|
for REPO in $(ls -d *)
|
||
|
do
|
||
|
echo -e "#### $(date +'%F_%R:%S') applying yaml from ${REPO} ..."
|
||
|
cd ${ANSBASE}/${REPO}
|
||
|
ansible-playbook *.yaml
|
||
|
done
|
||
|
|
||
|
echo "$(date +'%F_%R:%S') ------ END ------"
|