ansible-elastic-cloud-enterprise
ansible-elastic-cloud-enterprise copied to clipboard
Make role idempotent and controllable by variables in addition to --skip-tags
Hi
It would be nice if this role would be idempotent (only show changed on an ansible task if it realy changed somtehing on the system).
Furthermore --skip-tags setup_filesystem is prone to error because it is not the default behavior when running ansible.
This PR tries to fix this while remaining backwards compatible.
It changes the following:
- only show changed on an ansible task if it realy changes something on the system (makes it easy to re-run the role more than once)
- Ensure the needed kernel params in
GRUB_CMDLINE_LINUXare only present once. Even if they are already defined in different order - Reboot after
GRUB_CMDLINE_LINUXis changed (controllable withece_do_bootloader_reboot) - Only execute Update if the ece_version number is higher than the running one
- Use
ece_do_*variables in addition to the--skip-tagsfunctionality (the default value of the variables represent the same behavior as it would be used with the--skip-tags) - Implement
ece_do_cloudinitto disable all cloud-init related tasks - Use handler to restart docker service if something changes, instead of stopping it and starting it with every run
- Changing
{{ data_dir }}/dockertoelasticUser and group makes IMHO no sense, since the docker service will change it back torootafter a restart. So this PR removes it
💚 CLA has been signed