theforeman.foreman.katello_content_view_version (0.8.1) — module

Create, remove or interact with a Katello Content View Version

Authors: Sean O'Keeffe (@sean797)

preview | supported by community

Install collection

Install with ansible-galaxy collection install theforeman.foreman:==0.8.1


Add to requirements.yml

  collections:
    - name: theforeman.foreman
      version: 0.8.1

Description

Publish, Promote or Remove a Katello Content View Version


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the entity in Foreman
    type: str

version:
    description:
    - The content view version number (i.e. 1.0)
    type: str

password:
    description: Password of the user accessing the Foreman server
    required: true
    type: str

username:
    description: Username accessing the Foreman server
    required: true
    type: str

server_url:
    description: URL of the Foreman server
    required: true
    type: str

description:
    description:
    - Description of the Content View Version
    type: str

content_view:
    description:
    - Name of the content view
    required: true
    type: str

organization:
    description:
    - Organization that the entity is in
    required: true
    type: str

force_promote:
    aliases:
    - force
    default: false
    description:
    - Force content view promotion and bypass lifecycle environment restriction
    type: bool

validate_certs:
    aliases:
    - verify_ssl
    default: true
    description: Whether or not to verify the TLS certificates of the Foreman server
    type: bool

lifecycle_environments:
    description:
    - The lifecycle environments the Content View Version should be in.
    elements: str
    type: list

current_lifecycle_environment:
    description:
    - The lifecycle environment that is already associated with the content view version
    - Helpful for promoting a content view version
    type: str

force_yum_metadata_regeneration:
    default: false
    description:
    - Force metadata regeneration when performing Publish and Promote tasks
    type: bool