Skip to content

Commit

Permalink
Also check for a global lock of the configuration repository (#492)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt authored Jun 1, 2024
1 parent 3f4b5e3 commit f247d6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions files/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ if [[ -w $ANSIBLE_INVENTORY ]]; then
rm /ansible/inventory/[0-9]*
fi

if [[ -e $ENVIRONMENTS_DIRECTORY/.lock ]]; then
echo "ERROR: The configuration repository is locked."
exit 1
fi

if [[ -e $ENVIRONMENTS_DIRECTORY/$SUB/.lock ]]; then
echo "ERROR: The environment $SUB is locked via the configuration repository."
exit 1
Expand Down

0 comments on commit f247d6e

Please sign in to comment.