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
|
2023-04-12 17:36:02 -07:00
|
|
|
# @file Ansible Role Symlinks
|
2023-04-11 15:43:11 -07:00
|
|
|
# @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
|
|
|
|
2022-12-25 00:30:40 -08:00
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
2022-11-27 07:13:54 -08:00
|
|
|
|
2023-11-04 22:08:37 -07:00
|
|
|
{{ $roleDirs := (output "find" (joinPath .chezmoi.homeDir ".local" "share" "gas-station" "roles") "-mindepth" "2" "-maxdepth" "2" "-type" "d") -}}
|
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
|
|
|
{{- range $roleDir := splitList "\n" $roleDirs -}}
|
|
|
|
{{- if ne $roleDir "" -}}
|
|
|
|
# {{ $roleDir }}
|
2023-01-04 21:38:43 -08:00
|
|
|
{{- 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 }}
|
|
|
|
|
2022-12-25 06:00:18 -08:00
|
|
|
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"
|
2023-08-01 00:05:52 -07:00
|
|
|
find "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
|
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
|
|
|
ROLE_FOLDER="professormanhattan.$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
|
2022-12-02 19:29:10 -08:00
|
|
|
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
|
2023-11-04 18:46:18 -07:00
|
|
|
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"
|
2022-11-27 07:13:54 -08:00
|
|
|
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"
|
2022-12-02 19:29:10 -08:00
|
|
|
fi
|
2022-11-28 18:21:12 -08:00
|
|
|
done
|
2022-12-25 06:00:18 -08:00
|
|
|
|
2023-08-01 00:05:52 -07:00
|
|
|
if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/requirements.yml" ]; then
|
2023-01-24 17:45:48 -08:00
|
|
|
### 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
|
2023-11-04 18:46:18 -07:00
|
|
|
logg info 'Running pipx ensurepath'
|
2023-01-24 17:45:48 -08:00
|
|
|
pipx ensurepath
|
|
|
|
fi
|
2023-11-04 18:46:18 -07:00
|
|
|
logg info 'Installing ansible-core via pipx'
|
2023-01-24 17:45:48 -08:00
|
|
|
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
|
2023-01-05 15:10:07 -08:00
|
|
|
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=$?
|
2023-01-05 15:10:07 -08:00
|
|
|
if [ -n "$EXIT_CODE" ]; then
|
|
|
|
logg error 'Failed to install Ansible requirements from Ansible Galaxy'
|
2023-08-01 00:05:52 -07:00
|
|
|
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections" ]; then
|
2023-01-05 15:10:07 -08:00
|
|
|
logg info 'Attempting to use locally stored Ansible requirements'
|
2023-08-01 00:05:52 -07:00
|
|
|
cd "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections"
|
2023-01-05 15:10:07 -08:00
|
|
|
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
|
2023-01-08 21:42:32 -08:00
|
|
|
else
|
2023-08-01 00:05:52 -07:00
|
|
|
logg warn "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections is missing"
|
2023-01-04 21:35:24 -08:00
|
|
|
fi
|
|
|
|
fi
|
2023-01-05 15:10:07 -08:00
|
|
|
else
|
|
|
|
logg warn 'Unable to install the Ansible Galaxy requirements.yml since the ansible-galaxy executable is missing from the PATH'
|
2023-01-04 21:38:43 -08:00
|
|
|
fi
|
2023-01-05 15:10:07 -08:00
|
|
|
else
|
2023-01-08 21:42:32 -08:00
|
|
|
logg warn '~/.local/share/ansible/requirements.yml is missing'
|
2023-01-03 22:48:12 -08:00
|
|
|
fi
|