theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
149 stars 166 forks source link

Supported Roles Discussion #82

Closed ehelms closed 4 years ago

ehelms commented 6 years ago

Inspired by the conversation that ended at [1] and based upon some other side conversations, I wanted to start a discussion around supported roles. Currently this repository is focused on the creation of modules which serve as the building blocks for higher level infrastructure descriptions within Foreman and Katello. However, if one looks at the example @sean797 links to [2] you start to see that some common, higher level abstractions start to emerge. In the example, managing the content of a manifest in RH portal, downloading that manifest and importing it into Katello. Thus, bringing together multiple modules into a common workflow. You could imagine having a similar construct as well for say managing Suse content when that plugin is available.

Given that, I am wondering if we want to first think about and discuss creating some supported roles for higher level abstractions. Where a user could import the role (from git or galaxy), supply their variables and profit. If you take the same example, imagine a user just has to include roles, and create [3] where they are focused on the entity details for their situation and not how to write playbooks, and roles and compose them all.

Now, obviously this would largely work best for CRUD entities and not for actions. However, there is a possibility to create some "standard" workflow roles or playbooks. For example, sync repositories, publish CV, update composite, publish composite and promote it. This area would require more care to only tackle the most common workflows and leave the rest to customization. I'd also accept that this is getting too complex and should be left to the user to use the building blocks. I'd further accept (and encourage) a discussion around providing standard Jenkins pipeline "examples" that encompass these workflows for use.

Some Friday thoughts that I hope spark some good discussion based on all the awesome collaboration happening in the repository!

[1] https://github.com/theforeman/foreman-ansible-modules/pull/71#issuecomment-348526790 [2] https://github.com/sean797/ansible-role-configure-katello/blob/master/tasks/manifest.yml [3] https://github.com/sean797/ansible-role-configure-katello

mdellweg commented 6 years ago

I like the thought of a higher level interface. (Adding a bunch of repos in a new product and synching them as a single step sounds even better than in the ui). While the discussion is definitely in the right place here, I think, a galaxy like structure were more like one git repo per role. So how would we like to structure this? I cannot wait to see those jenkins pipelines. :clap:

ehelms commented 5 years ago

Looking to clean up any of my old issues, I ran across this. One of the hold ups originally was storage of roles. With collections, we are now encouraged to store "universally" useful roles within our collection providing value again to this conversation. Thoughts?

I know @sean797 had some roles as linked in the original comment, and I am aware of some work by @sthirugn to create some pre-defined workflows for common action sets.

sthirugn commented 5 years ago

I think there is some value in creating supported roles on top of modules for more easy consumption specifically tailored to more specific use cases.

jwbernin commented 5 years ago

I have a role I've been developing for Satellite 6.5 that does a lot of configuration work, would be happy to donate it to this repo for evaluation of supportability. It's still in a fairly "new" state, and it's been a bit since I've had time to devote to it... https://github.com/jwbernin/sat6-config

evgeni commented 4 years ago

@ehelms is there anything in this issue that has not been discussed in https://github.com/theforeman/foreman-ansible-modules/issues/535?

evgeni commented 4 years ago

the master has spoken, closing