Skip to content

Make role idempotent and controllable by variables in addition to --skip-tags #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

l4r-s
Copy link

@l4r-s l4r-s commented Apr 19, 2023

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_LINUX are only present once. Even if they are already defined in different order
  • Reboot after GRUB_CMDLINE_LINUX is changed (controllable with ece_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-tags functionality (the default value of the variables represent the same behavior as it would be used with the --skip-tags)
  • Implement ece_do_cloudinit to 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 }}/docker to elastic User and group makes IMHO no sense, since the docker service will change it back to root after a restart. So this PR removes it

@cla-checker-service
Copy link

cla-checker-service bot commented Apr 19, 2023

💚 CLA has been signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant