-
Notifications
You must be signed in to change notification settings - Fork 168
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
ansible native way to use the global registration feature #1284
Comments
Discussion on this topic from Discourse: https://community.theforeman.org/t/automating-global-registration-with-ansible/25325 |
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
to evgeni/foreman-ansible-modules
that referenced
this issue
Nov 16, 2023
evgeni
added a commit
that referenced
this issue
Jan 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
#1283 proposed an ansible module and basic role for generating registration commands with the global registration feature. After discussion, the author decided to withraw the role as it was not needed for their immediate goal.
I do think the role could be useful as a higher level / more user friendly interface to the module, particularly if it registers the generated commands as an ansible variable and provides some basic features like booleans
output_to_terminal
,output_to_file
and a configurable pathregistration_command_filepath
to work with that last one.So one workflow this enables would be to have a task running on a single host (the ansible control node) to generate the registration commands for a particular type of server and write them to a file on that machine, and a follow up task running on a group of servers in the inventory to copy the contents to each one as a script and execute.
Copying a script and executing it is probably not the most "Ansible native" way of doing things (from another point of view, it's exactly the Ansible way of doing things, only at a lower level) but with registering the generated commands in an ansible variable there is maybe some possibility of parsing that and utilizing standard ansible modules to perform equivalents of each piece... at that point, maybe we are better off giving the registration feature itself the option to generate native, well written ansible, or at least an ansible data structure to use with a pre-written role, and that could be the preferred way for ansible users to interact with this feature.
An aim of this collection is that anything that most anything that can be done with Katello WebUI, hammer, or API, should be also doable with ansible in a way that conforms to sane ansible practices. What that might look like for this particular feature is imo an interesting topic that deserves further discussion.
ISSUE TYPE
The text was updated successfully, but these errors were encountered: