Update file run_onchange_after_11-symlink-ansible-roles.tmpl
This commit is contained in:
parent
04f5183cde
commit
603f383b07
1 changed files with 11 additions and 1 deletions
|
@ -27,5 +27,15 @@ done
|
|||
|
||||
if [ -f "$HOME/.local/src/gas-station/requirements.yml" ] && command -v ansible-galaxy > /dev/null; then
|
||||
logg info 'Ensuring Ansible Galaxy collections are installed'
|
||||
ansible-galaxy install -r "$HOME/.local/src/gas-station/requirements.yml"
|
||||
ansible-galaxy install -r "$HOME/.local/src/gas-station/requirements.yml" || EXIT_CODE=$?
|
||||
if [ -n "$EXIT_CODE" ]; then
|
||||
logg error 'Failed to install Ansible requirements from Ansible Galaxy'
|
||||
if [ -d "$HOME/.local/src/gas-station/collections" ]; then
|
||||
logg info 'Attempting to use locally stored Ansible requirements'
|
||||
cd "$HOME/.local/src/gas-station/collections"
|
||||
ansible-galaxy install -r requirements.yml || SECOND_EXIT_CODE=$?
|
||||
if [ -n "$SECOND_EXIT_CODE" ]; then
|
||||
logg error 'Failed to install requirements from both the cloud and the local copy' && exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue