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

93 lines
4.8 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
# @file Ansible Role Symlinks
# @brief Symlinks roles that are part of the [Gas Station](https://github.com/megabyte-labs/gas-station) project to a location that Ansible can digest
# @description
# Install Doctor was previously called Gas Station. It was also Ansible based. Some of the features that Install Doctor
# provides are made available via Ansible roles that Gas Station provides. This script symlinks Gas Station's roles
# so that they can be leveraged by Install Doctor.
#
# Some of the roles that Gas Station provides are not available via Ansible Galaxy yet. This script symlinks Gas Station
# roles to an Ansible Galaxy / Ansible friendly location.
#
# ## Ansible Installation
#
# If Ansible is not already installed, this script will also install Ansible and all the necessary requirements using `pipx`.
# This script must run before the `install-packages` script because some of the Ansible roles might be leveraged by it.
#
# ## TODO
#
# * Move installation logic into the ZX installer so that Ansible and its dependencies are only installed when required
# * Remove Ansible dependency completely
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
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'
2023-01-30 21:44:52 -08:00
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/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/')"
2023-01-30 21:44:52 -08:00
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER" ] || [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER")" != "$ROLE_PATH" ]; then
logg info 'Symlinking `'"$ROLE_FOLDER"'`'
2023-01-30 21:44:52 -08:00
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
ln -s "$ROLE_PATH" "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
fi
2023-01-30 21:44:52 -08:00
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ALT_ROLE_FOLDER" ] || [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ALT_ROLE_FOLDER")" != "$ROLE_PATH" ]; then
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ALT_ROLE_FOLDER"
ln -s "$ROLE_PATH" "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ALT_ROLE_FOLDER"
fi
done
if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
### Install Ansible Galaxy and dependencies if missing
if ! command -v ansible-galaxy > /dev/null; then
if ! command -v pipx > /dev/null; then
logg info 'Installing pipx via Homebrew'
brew install pipx
logg info 'Running `pipx ensurepath`'
pipx ensurepath
fi
logg info 'Installing `ansible-core` via pipx'
pipx install ansible-core
if [ -d /Applications ] && [ -d /System ]; then
logg info 'Injecting macOS-specific pipx dependencies via pipx'
pipx inject ansible-core PyObjC PyObjC-core
fi
logg info 'Injecting Ansible dependencies via pipx'
pipx inject ansible-core docker lxml netaddr pexpect python-vagrant pywinrm requests-credssp watchdog
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs"
touch "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/ansible-installed"
fi
### Ensure Ansible Galaxy was successfully loaded and then install the Ansible Galaxy requirements
if command -v ansible-galaxy > /dev/null; then
logg info 'Ensuring Ansible Galaxy collections are installed'
2023-01-30 21:44:52 -08:00
export ANSIBLE_CONFIG="${XDG_DATA_HOME:-$HOME/.local/share}/ansible/ansible.cfg"
ansible-galaxy install -r "${XDG_DATA_HOME:-$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