Update 2 files

- /home/dot_local/share/ansible/symlink_requirements.yml.tmpl
- /home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.tmpl
This commit is contained in:
Brian Zalewski 2023-01-05 23:10:07 +00:00
parent c5ac0b60de
commit 2040d0ede5
2 changed files with 18 additions and 12 deletions

View file

@ -25,7 +25,8 @@ find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | whil
fi fi
done done
if [ -f "$HOME/.local/src/gas-station/requirements.yml" ] && command -v ansible-galaxy > /dev/null; then if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
if command -v ansible-galaxy > /dev/null; then
logg info 'Ensuring Ansible Galaxy collections are installed' logg info 'Ensuring Ansible Galaxy collections are installed'
ansible-galaxy install -r "$HOME/.local/src/gas-station/requirements.yml" || EXIT_CODE=$? ansible-galaxy install -r "$HOME/.local/src/gas-station/requirements.yml" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then if [ -n "$EXIT_CODE" ]; then
@ -39,4 +40,9 @@ if [ -f "$HOME/.local/src/gas-station/requirements.yml" ] && command -v ansible-
fi fi
fi fi
fi fi
else
logg warn 'Unable to install the Ansible Galaxy requirements.yml since the ansible-galaxy executable is missing from the PATH'
fi
else
logg warn '~/.local/src/gas-station/requirements.yml is missing'
fi fi

View file

@ -1,3 +1,3 @@
{{- if true -}} {{- if true -}}
{{ .host.home }}/.local/src/gas-station/playbooks {{ .host.home }}/.local/src/gas-station/requirements.yml
{{- end -}} {{- end -}}