CHANGE: adds a lock file to the scripts

This commit is contained in:
2026-08-18 12:49:54 +04:00
parent 09145ac1e5
commit 0daa4a4cf9
2 changed files with 14 additions and 0 deletions
+8
View File
@@ -1,3 +1,11 @@
#!/bin/bash
LOCK_FILE=/tmp/vmn_ansible_lock_file.lock
while [ -f "$LOCK_FILE" ]
do
sleep 1s
done
source .venv/bin/activate
ansible-playbook playbooks/maintain.yaml --vault-pass-file ~/vault_password -i inventory/hosts.yaml --private-key ~/.ssh/ansible_key