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 e2132a3c51 which did the same
for the `requirements.yml` file.
This commit is contained in:
Slavi Pantaleev 2023-11-19 15:25:28 +02:00
parent c816f75930
commit 7a06bd9588
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@
.DS_Store
/requirements.yml
/setup.yml

View file

@ -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