From 5274815c62522d40a945ab155b43453e51a343e5 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 25 Oct 2026 09:42:48 +0200 Subject: [PATCH] Install missing and outdated roles before running the playbook Pulling a playbook update which adds roles or bumps their versions required running `just roles` before the playbook could use them. Otherwise, the run failed on a missing role or used an outdated one. `just run`, and so `just install-all`, `just setup-all` and the other recipes based on it, as well as `just register-user`, now first install missing and outdated roles, the same way `just roles` does: roles with local changes are kept (with a warning), as are symlinked roles and roles containing a `.git` directory. When all roles are up to date, nothing is downloaded and nothing is printed. The same change in mash-playbook: https://github.com/mother-of-all-self-hosting/mash-playbook/commit/75b1c3ac Co-Authored-By: Claude Opus 5.5 (1M context) --- justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index a6767027c..b117ef527 100644 --- a/justfile +++ b/justfile @@ -119,7 +119,7 @@ install-service service *extra_args: setup-all *extra_args: (run-tags "setup-all,ensure-matrix-users-created,start" extra_args) # Runs the playbook with the given list of arguments -run +extra_args: +run +extra_args: (_install-roles "--quiet") ansible-playbook -i {{ inventory }} setup.yml {{ extra_args }} # Runs the playbook with the given list of comma-separated tags and optional arguments @@ -127,7 +127,7 @@ run-tags tags *extra_args: {{ just_executable() }} --justfile "{{ justfile() }}" run --tags={{ tags }} {{ extra_args }} # Runs the playbook in user-registration mode -register-user username password admin_yes_or_no *extra_args: +register-user username password admin_yes_or_no *extra_args: (_install-roles "--quiet") ansible-playbook -i {{ inventory }} setup.yml --tags=register-user --extra-vars="username={{ username }} password={{ password }} admin={{ admin_yes_or_no }}" {{ extra_args }} # Starts all services