CHANGE: ensures pulls and updates before running jobs

This commit is contained in:
2026-08-18 16:57:27 +04:00
parent b698108980
commit 04894aef9f
2 changed files with 5 additions and 11 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
#!/bin/bash
LOCK_FILE=/tmp/vmn_ansible_lock_file.lock
# 1 - Pull the latest code
git pull origin main
while [ -f "$LOCK_FILE" ]
do
sleep 1s
done
# 2 - Update dependencies and modules
./scripts/update_modules.sh
# 3 - Run the job
source .venv/bin/activate
ansible-playbook playbooks/maintain.yaml --vault-pass-file ~/vault_password -i inventory/hosts.yaml --private-key ~/.ssh/ansible_key