katello_content_view_version – Create, remove or interact with a Katello Content View Version

Synopsis

  • Publish, Promote or Remove a Katello Content View Version

Requirements

The below requirements are needed on the host that executes this module.

  • apypie

Parameters

Parameter Choices/Defaults Comments
content_view
string / required
Name of the content view
current_lifecycle_environment
string
The lifecycle environment that is already associated with the content view version
Helpful for promoting a content view version
description
string
Description of the Content View Version
force_promote
boolean
    Choices:
  • no ←
  • yes
Force content view promotion and bypass lifecycle environment restriction

aliases: force
force_yum_metadata_regeneration
boolean
    Choices:
  • no ←
  • yes
Force metadata regeneration when performing Publish and Promote tasks
lifecycle_environments
list / elements=string
The lifecycle environments the Content View Version should be in.
organization
string / required
Organization that the entity is in
password
string / required
Password of the user accessing the Foreman server
server_url
string / required
URL of the Foreman server
state
string
    Choices:
  • present ←
  • absent
State of the entity in Foreman
username
string / required
Username accessing the Foreman server
validate_certs
boolean
    Choices:
  • no
  • yes ←
Whether or not to verify the TLS certificates of the Foreman server

aliases: verify_ssl
version
string
The content view version number (i.e. 1.0)

Notes

Note

  • You cannot use this to remove a Content View Version from a Lifecycle environment, you should promote another version first.

  • For idempotency you must specify either version or current_lifecycle_environment.

Examples

- name: "Ensure content view version 2.0 is in Test & Pre Prod"
  katello_content_view_version:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    content_view: "CV 1"
    organization: "Default Organization"
    version: 2.0
    lifecycle_environments:
      - Test
      - Pre Prod

- name: "Ensure content view version in Test is also in Pre Prod"
  katello_content_view_version:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    content_view: "CV 1"
    organization: "Default Organization"
    current_lifecycle_environment: Test
    lifecycle_environments:
      - Pre Prod

- name: "Publish a content view, not idempotent"
  katello_content_view_version:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    content_view: "CV 1"
    organization: "Default Organization"

- name: "Publish a content view and promote that version to Library & Dev, not idempotent"
  katello_content_view_version:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    content_view: "CV 1"
    organization: "Default Organization"
    lifecycle_environments:
      - Library
      - Dev

- name: "Ensure content view version 1.0 doesn't exist"
  katello_content_view_version:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    content_view: "Web Servers"
    organization: "Default Organization"
    version: 1.0
    state: absent

Status

Authors

  • Sean O’Keeffe (@sean797)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.