theforeman.foreman.content_view (4.0.0) — module

Manage Content Views

| "added in version" 1.0.0 of theforeman.foreman"

Authors: Eric D Helms (@ehelms)

Install collection

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


Add to requirements.yml

  collections:
    - name: theforeman.foreman
      version: 4.0.0

Description

Create and manage content views


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create or update Fedora content view"
  theforeman.foreman.content_view:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "Fedora CV"
    organization: "My Cool new Organization"
    repositories:
      - name: 'Fedora 26'
        product: 'Fedora'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create a composite content view"
  theforeman.foreman.content_view:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "Fedora CCV"
    organization: "My Cool new Organization"
    composite: true
    auto_publish: true
    components:
      - content_view: Fedora CV
        content_view_version: 1.0
      - content_view: Internal CV
        latest: true

Inputs

    
name:
    description:
    - Name of the Content View
    required: true
    type: str

label:
    description:
    - Label of the Content View. This field cannot be updated.
    type: str

state:
    choices:
    - present
    - present_with_defaults
    - absent
    default: present
    description:
    - State of the entity
    - C(present_with_defaults) will ensure the entity exists, but won't update existing
      ones
    type: str

password:
    description:
    - Password of the user accessing the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD)
      will be used instead.
    required: true
    type: str

username:
    description:
    - Username accessing the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME)
      will be used instead.
    required: true
    type: str

composite:
    default: false
    description:
    - A composite view contains other content views.
    type: bool

components:
    description:
    - List of content views to includes content_view and either version or latest.
    - Ignored if I(composite=False).
    elements: dict
    suboptions:
      content_view:
        description:
        - Content View name to be added to the Composite Content View
        required: true
        type: str
      content_view_version:
        aliases:
        - version
        description:
        - Version of the Content View to add
        type: str
      latest:
        default: false
        description:
        - Always use the latest Content View Version
        type: bool
    type: list

server_url:
    description:
    - URL of the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL)
      will be used instead.
    required: true
    type: str

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

import_only:
    description:
    - Designate this Content View for importing from upstream servers only.
    type: bool
    version_added: 3.14.0
    version_added_collection: theforeman.foreman

auto_publish:
    default: false
    description:
    - Auto publish composite view when a new version of a component content view is created.
    - Also note auto publish will only happen when the component is marked "latest".
    type: bool

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

repositories:
    description:
    - List of repositories that include name and product.
    - Cannot be combined with I(composite=True).
    elements: dict
    suboptions:
      name:
        description:
        - Name of the Repository to be added
        required: true
        type: str
      product:
        description:
        - Product of the Repository to be added
        required: true
        type: str
    type: list

validate_certs:
    default: true
    description:
    - Whether or not to verify the TLS certificates of the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS)
      will be used instead.
    type: bool

solve_dependencies:
    description:
    - Solve RPM dependencies by default on Content View publish
    type: bool

Outputs

entity:
  contains:
    content_views:
      description: List of content views.
      elements: dict
      type: list
  description: Final state of the affected entities grouped by their type.
  returned: success
  type: dict