mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-11-02 19:54:15 +00:00
Install roles on just update through _install-roles
`just update` had its own copy of the agru and ansible-galaxy calls. It now installs roles through `_install-roles`, like `just roles`. With `-u` (and agru), it still updates the role versions pinned in requirements.yml, which also installs them. The same change in mash-playbook (which additionally regenerates its optimized files there): https://github.com/mother-of-all-self-hosting/mash-playbook/commit/32db6a41 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ee7da45e1f
commit
3d711ab33f
@@ -28,15 +28,17 @@ roles:
|
||||
# Updates the playbook and installs the necessary Ansible roles pinned in requirements.yml. If a -u flag is passed, also updates the requirements.yml file with new role versions (if available)
|
||||
update *flags: update-playbook-only
|
||||
#!/usr/bin/env sh
|
||||
if [ -x "$(command -v agru)" ]; then
|
||||
echo {{ if flags == "" { "Installing roles pinned in requirements.yml…" } else if flags == "-u" { "Updating roles and pinning new versions in requirements.yml…" } else { "Unknown flags passed" } }}
|
||||
agru -p roles/galaxy/ -no-tui {{ flags }}
|
||||
else
|
||||
echo "[NOTE] You are using the standard ansible-galaxy tool to install roles, which is slow and lacks other features. We recommend installing the 'agru' tool to speed up the process: https://github.com/etkecc/agru#where-to-get"
|
||||
echo "Installing roles…"
|
||||
rm -rf roles/galaxy
|
||||
ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force
|
||||
set -eu
|
||||
if [ "{{ flags }}" = "-u" ] && [ -x "$(command -v agru)" ]; then
|
||||
# This updates the versions pinned in requirements.yml and installs the roles
|
||||
echo "Updating roles and pinning new versions in requirements.yml…"
|
||||
agru -p roles/galaxy/ -no-tui -u
|
||||
exit 0
|
||||
fi
|
||||
if [ -n "{{ flags }}" ]; then
|
||||
echo "Ignoring unsupported flags: {{ flags }}"
|
||||
fi
|
||||
{{ just_executable() }} --justfile "{{ justfile() }}" _install-roles
|
||||
|
||||
# Updates the playbook without installing/updating Ansible roles
|
||||
update-playbook-only:
|
||||
|
||||
Reference in New Issue
Block a user