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

ansible native way to use the global registration feature #1284

Closed
wbclark opened this issue Sep 9, 2021 · 1 comment · Fixed by #1683
Closed

ansible native way to use the global registration feature #1284

wbclark opened this issue Sep 9, 2021 · 1 comment · Fixed by #1683

Comments

@wbclark
Copy link
Contributor

wbclark commented Sep 9, 2021

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 path registration_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
  • Feature Idea
@wbclark
Copy link
Contributor Author

wbclark commented Oct 12, 2021

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants