install.fairie/home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.tmpl

53 lines
2.5 KiB
Cheetah
Raw Normal View History

Update dotfiles/.local/share/chezmoi/home/private_dot_config/environments/terminal, dotfiles/.local/software/development/Brewfile, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/development, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/desktop, dotfiles/.local/software/desktop/Brewfile, dotfiles/.local/software/desktop/Packages.config, dotfiles/.local/software/desktop/Wingetfile, dotfiles/.local/software/development/Packages.config, dotfiles/.local/software/development/Scoopfile, dotfiles/.local/software/terminal/Brewfile, dotfiles/.local/software/terminal/Packages.config, dotfiles/.local/software/terminal/Scoopfile, dotfiles/.local/software/Gasfile.yml, dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/system/etc/timeshift/timeshift.json, dotfiles/.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl, dotfiles/.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports.tmpl, dotfiles/.local/share/chezmoi/system/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/roles/run_onchange_after_symlink-ansible-roles, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qscp, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl Deleted dotfiles/.local/share/chezmoi/home/private_dot_config/environments/work
2022-11-27 06:59:13 -08:00
#!/usr/bin/env bash
Update 19 files - /home/.chezmoiscripts/universal/run_onchange_after_11-symlink-ansible-roles.tmpl - /home/.chezmoiscripts/universal/run_before_1-decrypt-age-key.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_12-install-packages.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_14_install-aqua-packages.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_18-install-sdkman.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_50-crontab.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_80-bash-completions.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_99_bootstrap-zsh-plugins.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl - /home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl - /home/.chezmoiscripts/opensuse/run_onchange_before_11-install-opensuse-software.tmpl - /home/.chezmoiscripts/freebsd/run_onchange_before_11-install-freebsd-packages.tmpl - /home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl - /home/.chezmoiscripts/debian/run_onchange_before_10-install-debian-dependencies.tmpl - /home/.chezmoiscripts/darwin/run_onchange_before_10_install-darwin-dependencies.tmpl - /home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl - /home/.chezmoiscripts/archlinux/run_onchange_before_10_install-archlinux-dependencies.tmpl - /home/.chezmoiscripts/_universal/run_onchange_before_5-install-homebrew.tmpl - /home/.chezmoiscripts/_universal/run_onchange_before_8-install-zx.tmpl
2022-12-25 00:30:40 -08:00
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
Update dotfiles/.local/share/chezmoi/home/private_dot_config/environments/terminal, dotfiles/.local/software/development/Brewfile, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/development, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/desktop, dotfiles/.local/software/desktop/Brewfile, dotfiles/.local/software/desktop/Packages.config, dotfiles/.local/software/desktop/Wingetfile, dotfiles/.local/software/development/Packages.config, dotfiles/.local/software/development/Scoopfile, dotfiles/.local/software/terminal/Brewfile, dotfiles/.local/software/terminal/Packages.config, dotfiles/.local/software/terminal/Scoopfile, dotfiles/.local/software/Gasfile.yml, dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/system/etc/timeshift/timeshift.json, dotfiles/.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl, dotfiles/.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports.tmpl, dotfiles/.local/share/chezmoi/system/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/roles/run_onchange_after_symlink-ansible-roles, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qscp, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl Deleted dotfiles/.local/share/chezmoi/home/private_dot_config/environments/work
2022-11-27 06:59:13 -08:00
{{ $roleDirs := (output "find" (joinPath .chezmoi.homeDir ".local" "src" "gas-station" "roles") "-mindepth" "2" "-maxdepth" "2" "-type" "d") -}}
{{- range $roleDir := splitList "\n" $roleDirs -}}
{{- if ne $roleDir "" -}}
# {{ $roleDir }}
{{- end -}}
Update dotfiles/.local/share/chezmoi/home/private_dot_config/environments/terminal, dotfiles/.local/software/development/Brewfile, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/development, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/desktop, dotfiles/.local/software/desktop/Brewfile, dotfiles/.local/software/desktop/Packages.config, dotfiles/.local/software/desktop/Wingetfile, dotfiles/.local/software/development/Packages.config, dotfiles/.local/software/development/Scoopfile, dotfiles/.local/software/terminal/Brewfile, dotfiles/.local/software/terminal/Packages.config, dotfiles/.local/software/terminal/Scoopfile, dotfiles/.local/software/Gasfile.yml, dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/system/etc/timeshift/timeshift.json, dotfiles/.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl, dotfiles/.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports.tmpl, dotfiles/.local/share/chezmoi/system/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/roles/run_onchange_after_symlink-ansible-roles, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qscp, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl Deleted dotfiles/.local/share/chezmoi/home/private_dot_config/environments/work
2022-11-27 06:59:13 -08:00
{{- end }}
logg info 'Ensuring Gas Station roles are symlinked to ~/.local/share/ansible/roles'
mkdir -p "$XDG_DATA_HOME/ansible/roles"
Update dotfiles/.local/share/chezmoi/home/private_dot_config/environments/terminal, dotfiles/.local/software/development/Brewfile, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/development, dotfiles/.local/share/chezmoi/home/private_dot_config/environments/desktop, dotfiles/.local/software/desktop/Brewfile, dotfiles/.local/software/desktop/Packages.config, dotfiles/.local/software/desktop/Wingetfile, dotfiles/.local/software/development/Packages.config, dotfiles/.local/software/development/Scoopfile, dotfiles/.local/software/terminal/Brewfile, dotfiles/.local/software/terminal/Packages.config, dotfiles/.local/software/terminal/Scoopfile, dotfiles/.local/software/Gasfile.yml, dotfiles/.local/share/chezmoi/home/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/.chezmoidata.yaml, dotfiles/.local/share/chezmoi/system/etc/timeshift/timeshift.json, dotfiles/.local/share/chezmoi/home/private_dot_config/VirtualBox/VirtualBox.xml.tmpl, dotfiles/.local/share/chezmoi/home/Library/VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/dot_VirtualBox/VirtualBox.xml, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/exports.tmpl, dotfiles/.local/share/chezmoi/system/.chezmoiexternal.toml, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_install-software, dotfiles/.local/share/chezmoi/home/private_dot_config/shell/aliases.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/roles/run_onchange_after_symlink-ansible-roles, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_environments.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_playbooks.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/tasks/symlink_qubes.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_README.md.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_Vagrantfile.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_ansible.cfg.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_main.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_requirements.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/symlink_docs.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_commonlib.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/action/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/connection/symlink_qubes.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_jq.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/lookup/symlink_qubes-pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubes_pass.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesformation.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubesguid.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/share/ansible/plugins/library/symlink_qubessls.py.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_bombshell-client.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qrun.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qssh.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/symlink_qscp, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/run_onchange_ensure-executable.tmpl Deleted dotfiles/.local/share/chezmoi/home/private_dot_config/environments/work
2022-11-27 06:59:13 -08:00
find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
ROLE_FOLDER="professormanhattan.$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
ALT_ROLE_FOLDER="$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ ! -d "$XDG_DATA_HOME/ansible/roles/$ROLE_FOLDER" ] || [ "$(readlink -f "$XDG_DATA_HOME/ansible/roles/$ROLE_FOLDER")" != "$ROLE_PATH" ]; then
logg info 'Symlinking `'"$ROLE_FOLDER"'`'
rm -f "$XDG_DATA_HOME/ansible/roles/$ROLE_FOLDER"
ln -s "$ROLE_PATH" "$XDG_DATA_HOME/ansible/roles/$ROLE_FOLDER"
fi
if [ ! -d "$XDG_DATA_HOME/ansible/roles/$ALT_ROLE_FOLDER" ] || [ "$(readlink -f "$XDG_DATA_HOME/ansible/roles/$ALT_ROLE_FOLDER")" != "$ROLE_PATH" ]; then
rm -f "$XDG_DATA_HOME/ansible/roles/$ALT_ROLE_FOLDER"
ln -s "$ROLE_PATH" "$XDG_DATA_HOME/ansible/roles/$ALT_ROLE_FOLDER"
fi
done
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'
export ANSIBLE_CONFIG="$HOME/.local/share/ansible/ansible.cfg"
ansible-galaxy install -r "$HOME/.local/share/ansible/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
else
logg warn '~/.local/src/gas-station/collections is missing'
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/share/ansible/requirements.yml is missing'
fi