From 7a06bd9588b2a6b2f042b022c50ea439fe36bc15 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sun, 19 Nov 2023 15:25:28 +0200 Subject: [PATCH] Create setup.yml based on a template (setup.all.yml) In the future, we'll also have optional optimization steps, which could trim down `setup.yml` based on the components being used. Related to e2132a3c51508065621f8ea9107a9fa987d4f9fa which did the same for the `requirements.yml` file. --- .gitignore | 1 + justfile | 9 ++++++++- setup.yml => setup.all.yml | 0 3 files changed, 9 insertions(+), 1 deletion(-) rename setup.yml => setup.all.yml (100%) diff --git a/.gitignore b/.gitignore index 7f411f6..893d187 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .DS_Store /requirements.yml +/setup.yml diff --git a/justfile b/justfile index 488e575..d75d9ed 100644 --- a/justfile +++ b/justfile @@ -39,7 +39,7 @@ install-service service *extra_args: setup-all *extra_args: (run-tags "setup-all,start" extra_args) # Runs the playbook with the given list of arguments -run +extra_args: requirements-yml +run +extra_args: requirements-yml setup-yml ansible-playbook -i inventory/hosts setup.yml {{ extra_args }} # Runs the playbook with the given list of comma-separated tags and optional arguments @@ -66,3 +66,10 @@ requirements-yml: if [ ! -f "{{ justfile_directory() }}/requirements.yml" ]; then cp {{ justfile_directory() }}/requirements.all.yml {{ justfile_directory() }}/requirements.yml fi + +# Prepares the setup.yml file +setup-yml: + #!/usr/bin/env sh + if [ ! -f "{{ justfile_directory() }}/setup.yml" ]; then + cp {{ justfile_directory() }}/setup.all.yml {{ justfile_directory() }}/setup.yml + fi diff --git a/setup.yml b/setup.all.yml similarity index 100% rename from setup.yml rename to setup.all.yml