Commit graph

10 commits

Author SHA1 Message Date
Slavi Pantaleev
f7e1ff5fba
Fix groups for semaphore 2023-12-06 17:25:48 +02:00
moanos
12a8b63bbd feat: Add ansible-semaphore playbook files 2023-12-06 16:18:42 +01:00
Slavi Pantaleev
a10d2eaf85 Switch from devture_traefik_container_additional_networks to devture_traefik_container_additional_networks_auto
Related to e3375d56f3
2023-12-05 09:18:05 +02:00
Slavi Pantaleev
bf16e7b895 Fix variable name typo 2023-12-01 19:52:36 +02:00
Slavi Pantaleev
da005a7d36 Make hubsite not break when optimizing the playbook 2023-11-21 10:15:40 +02:00
Slavi Pantaleev
803c623bab Add some more role-specific annotations to templates/group_vars_mash_servers
There's a lot more that can be added, especially to decouple from
some default components like Postgres and Traefik.
2023-11-20 17:20:17 +02:00
Slavi Pantaleev
3b6912d275 Ensure certain lists (containing role-specific elements) are never empty 2023-11-20 16:54:43 +02:00
Slavi Pantaleev
3242ee8acd Add role-specific annotations for mash_playbook_mariadb_managed_databases_auto_itemized 2023-11-20 16:49:41 +02:00
Slavi Pantaleev
74dbc2dda4 Add role-specific annotations for mash_playbook_devture_postgres_managed_databases_auto_itemized 2023-11-20 16:48:03 +02:00
Slavi Pantaleev
d2c9ed3e45 Initial work on optimization commands
The playbook can now optimize itself based on the enabled components in
for all hosts in the inventory (`just optimize`) or for a specific host
(`just optimize-for-host HOSTNAME`).

The optimized playbook will have:

- fewer requirements (fewer roles need to be installed by `just roles`)
- a shorter and quicker to evaluate `group_vars/mash_servers` file
- a `setup.yml` file which includes less roles

Running the playbook optimized is still work in progress.
There still probably exist various role dependencies in the group-vars file, etc.

The `optimize-reset` command aims to restore your playbook to a
non-optimized state, which should work as before (and not experience bugs).

The playbook takes care to notice of changes to the various files in
`templates/` (`setup.yml`, `requirements.yml`, `group_vars_mash_servers`)
and update your optimized or non-optimized copies that are derived from
these templates. To do this, it keeps `.srchash` files in the `run/` directory.
When it notices a change in the source file's hash (by comparing to the `.srchash` file),
it will update you to the new template.

Optimization state is stored in a file in `run/` as well (`optimization-vars-files.state`).
Should the playbook notice changes in the source `template/` files, it
should update you and re-optimize using the same parameters as before (read from the state file).
2023-11-20 16:29:06 +02:00
Renamed from group_vars/mash_servers_all (Browse further)