Skip to content
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

Run playbooks during kickstart #417

Open
duncaninnes opened this issue Oct 10, 2024 · 1 comment
Open

Run playbooks during kickstart #417

duncaninnes opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@duncaninnes
Copy link

Feature Request or Enhancement

  • Feature []
  • Enhancement [Ability to run all playbooks during kickstart process]

Summary of Request
Would like to be able to run all playbooks during the kickstart process. This would require kickstarts to detect when they are running in a kickstart process and not attempt to stop/start any services. Services will still be stop/started during normal operation, just not during kickstart.

Describe Alternatives You've Considered
We don't run most of the playbooks during kickstart. This is a shame, as systems boot up half-configured and requiring the playbooks to be run ASAP on boot.

Suggested Code
Not sure how to detect when running in kickstart, but once an adequate detection can be made, parts of playbooks which cause trouble during kickstart would have a "when {{ not-kickstart }}" or similar added to their definition block. This would allow the playbooks to be fully run during kickstart, resulting in a fully configured and locked-down system before firstboot. All services will be enabled/disabled and configured during kickstart, but no attempt will be made to stop/start the services.

@uk-bolly
Copy link
Member

hi @duncaninnes

Thank you for the issue, This is a great question, i know we have community members already incorporating these into kickstart. But as with all things in IT there are many ways to do things.

there are a couple of quick approaches we could investigate but they all have pros and cons.

e.g.
End the play if kickstart before running handlers
This could miss out important handler like updating grub, creating aidedb etc

- name: End the play hosts if kickstart
  ansible.builtin.meta: end_host
  when:
  - kickstart_used

or we could look to adding conditionals to handlers but as mentioned some will want somethings to run others wont.

It maybe a good idea to ask the discord community to see how others are getting around this, we could then get a standard approach for all documented based on the feedback.
discord link - https://lockdownenterprise.com/discord

I hope that helps, please let us know as we are keep to improve and enhance these roles.

many thanks

uk-bolly

@uk-bolly uk-bolly self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants