From 3d711ab33f13ecc03b4bbc18df3c04382e292d93 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 25 Oct 2026 08:00:28 +0200 Subject: [PATCH] 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) --- justfile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/justfile b/justfile index 278251f92..bfeabd3ab 100644 --- a/justfile +++ b/justfile @@ -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: