d2c9ed3e45
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).
43 lines
794 B
INI
43 lines
794 B
INI
# This file is the top-most EditorConfig file
|
|
root = true
|
|
|
|
# All Files
|
|
[*]
|
|
charset = utf-8
|
|
end_of_line = lf
|
|
indent_style = tab
|
|
indent_size = 4
|
|
insert_final_newline = true
|
|
trim_trailing_whitespace = true
|
|
|
|
#########################
|
|
# File Extension Settings
|
|
#########################
|
|
|
|
# YAML Files
|
|
[*.{yml,yaml,log.config.j2,yaml.j2}]
|
|
indent_style = space
|
|
indent_size = 2
|
|
|
|
[*.py]
|
|
indent_style = space
|
|
indent_size = 4
|
|
|
|
[group_vars/mash_servers]
|
|
indent_style = space
|
|
indent_size = 2
|
|
|
|
[templates/group_vars_mash_servers]
|
|
indent_style = space
|
|
indent_size = 2
|
|
|
|
[justfile]
|
|
indent_style = space
|
|
indent_size = 4
|
|
|
|
# Markdown Files
|
|
#
|
|
# Two spaces at the end of a line in Markdown mean "new line",
|
|
# so trimming trailing whitespace for such files can cause breakage.
|
|
[*.md]
|
|
trim_trailing_whitespace = false
|