From a1f2b59b9b5e48db3205ee8653b8f6867299fc28 Mon Sep 17 00:00:00 2001 From: Aine Date: Wed, 14 Aug 2024 11:31:49 +0300 Subject: [PATCH] run 'just versions' and 'just opml' only when 'just update' has '-u' flag --- justfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 5f00ce1..9ed4a31 100644 --- a/justfile +++ b/justfile @@ -77,8 +77,6 @@ update *flags: update-playbook-only 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 -r {{ templates_directory_path }}/requirements.yml {{ flags }} - just --justfile {{ justfile() }} versions - just --justfile {{ justfile() }} opml 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..." @@ -86,6 +84,11 @@ update *flags: update-playbook-only ansible-galaxy install -r requirements.yml -p roles/galaxy/ --force fi + if [[ "{{ flags }}" == "-u" ]]; then + just --justfile {{ justfile() }} versions + just --justfile {{ justfile() }} opml + fi + # Updates the playbook without installing/updating Ansible roles update-playbook-only: @echo "Updating playbook..."