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
147 stars 163 forks source link

naming content views modules #87

Closed gregswift closed 5 years ago

gregswift commented 6 years ago

Hey! guess what.. i thought of something crappy.

We agreed to have composite_content_view as a separate module, which can make things easier for consumers of the modules. its way more specific (i'm kewl with it).

So in general our workflow is this:

1) Create a bunch of products with modules 2) Create dedicated content views for a thing (CentOS, PostgreSQL, Zabbix, Product1, Product2, etc) 3) Version the content views 4) Create composite content views for groups that need them (Generic, Product1, Product2) 5) Add versions of content views to the composite view 6) Cut releases of the composite view 7) Promote version of the composite view

So the playbook for pushing a new version of the CentOS repositories through the Generic CCV with ansible will look something like this

- tasks:
  - katello_publish:
      content_view: CV CentOS
  - katello_composite_content_view:
      name: CCV Generic
      content_views:
        - name: CV CentOS
          version: [umm how do i know what got cut?]
  - katello_publish:
      content_view: CCV Generic
  - katello_content_view_version_promote:
      content_view: CCV Generic
      version: [umm what is it?]
      to_environment: Library
  - katello_content_view_version_promote:
      content_view: CCV Generic
      version: [umm what is it?]
      from_environment: Library
      to_environment: Staging

It feels to me like handling the CCV inside the CV modules invalidates the reasoning for having composite as a separate module.

gregswift commented 6 years ago

unless that means i need to create a ccv_publish and ccv_promote as well?

mdellweg commented 6 years ago

I am fine with the proposed model of having specific modules for creation, but common modules for the common tasks (publish, promote), unless of course there happen to be unforeseen differences between CV and CCV.

sean797 commented 5 years ago

Since https://github.com/theforeman/foreman-ansible-modules/pull/180 create katello_content_view_version, and deprecated katello_content_view_version_promote & katello_content_view_publish im going to close this.

If anyone has any objects to the current CV modules APIs please re-open this and we can discuss.