Create group_vars/mash_servers based on a template (group_vars/mash_servers_all)
In the future, we'll also have optional optimization steps, which could trim down `group_vars/mash_servers` based on the components being used.
This commit is contained in:
parent
3273f475bb
commit
e71a879748
3 changed files with 8 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -15,3 +15,6 @@
|
||||||
|
|
||||||
/setup.yml
|
/setup.yml
|
||||||
/setup.yml.srchash
|
/setup.yml.srchash
|
||||||
|
|
||||||
|
/group_vars/mash_servers
|
||||||
|
/group_vars/mash_servers.srchash
|
||||||
|
|
6
justfile
6
justfile
|
@ -39,7 +39,7 @@ install-service service *extra_args:
|
||||||
setup-all *extra_args: (run-tags "setup-all,start" extra_args)
|
setup-all *extra_args: (run-tags "setup-all,start" extra_args)
|
||||||
|
|
||||||
# Runs the playbook with the given list of arguments
|
# Runs the playbook with the given list of arguments
|
||||||
run +extra_args: requirements-yml setup-yml
|
run +extra_args: requirements-yml setup-yml group-vars-mash-servers
|
||||||
ansible-playbook -i inventory/hosts setup.yml {{ extra_args }}
|
ansible-playbook -i inventory/hosts setup.yml {{ extra_args }}
|
||||||
|
|
||||||
# Runs the playbook with the given list of comma-separated tags and optional arguments
|
# Runs the playbook with the given list of comma-separated tags and optional arguments
|
||||||
|
@ -68,6 +68,10 @@ requirements-yml:
|
||||||
setup-yml:
|
setup-yml:
|
||||||
@just --justfile {{ justfile() }} _ensure_file_prepared {{ justfile_directory() }}/setup.all.yml {{ justfile_directory() }}/setup.yml
|
@just --justfile {{ justfile() }} _ensure_file_prepared {{ justfile_directory() }}/setup.all.yml {{ justfile_directory() }}/setup.yml
|
||||||
|
|
||||||
|
# Prepares the group_vars/mash_servers file
|
||||||
|
group-vars-mash-servers:
|
||||||
|
@just --justfile {{ justfile() }} _ensure_file_prepared {{ justfile_directory() }}/group_vars/mash_servers_all {{ justfile_directory() }}/group_vars/mash_servers
|
||||||
|
|
||||||
_ensure_file_prepared src_path dst_path:
|
_ensure_file_prepared src_path dst_path:
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
hash_path={{ dst_path }}.srchash
|
hash_path={{ dst_path }}.srchash
|
||||||
|
|
Loading…
Reference in a new issue