Commit graph

10 commits

Author SHA1 Message Date
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
Slavi Pantaleev
e71a879748 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.
2023-11-20 11:07:31 +02:00
Slavi Pantaleev
3273f475bb Ensure setup.yml and requirements.yml are updated when .all.yml files change 2023-11-20 11:05:18 +02:00
Slavi Pantaleev
7a06bd9588 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.
2023-11-19 15:25:28 +02:00
Slavi Pantaleev
c816f75930 Add requirements.yml to .gitignore 2023-11-19 14:28:16 +02:00
Slavi Pantaleev
8ee20f69a6 Fix typo in .gitignores 2023-11-19 14:21:28 +02:00
kinduff
865746f0e3 Adds support for n8n 2023-07-19 12:08:59 +02:00
Aine
84aee1ddce
fix .gitignore 2023-03-19 09:18:05 +02:00
Aine
a27735b5cf
add ansible.cfg; reorganize inventory a bit 2023-03-19 09:16:29 +02:00
Slavi Pantaleev
488864d29e Initial commit 2023-03-15 10:58:12 +02:00