theforeman.foreman.product (4.0.0) — module

Manage Products

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

Authors: Eric D Helms (@ehelms), Matthias Dellweg (@mdellweg) ATIX AG

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 products


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create Fedora product with a sync plan"
  theforeman.foreman.product:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "Fedora"
    organization: "My Cool new Organization"
    sync_plan: "Fedora repos sync"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create CentOS 7 product with content credentials"
  theforeman.foreman.product:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "CentOS 7"
    gpg_key: "RPM-GPG-KEY-CentOS7"
    organization: "My Cool new Organization"
    state: present

Inputs

    
name:
    description:
    - Name of the product
    required: true
    type: str

label:
    description:
    - Label to show the user
    required: false
    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

gpg_key:
    description:
    - Content GPG key name attached to this product
    required: false
    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

sync_plan:
    description:
    - Sync plan name attached to this product
    required: false
    type: str

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:
    - Possibly long description to show the user in detail view
    required: false
    type: str

ssl_ca_cert:
    description:
    - Content SSL CA certificate name attached to this product
    required: false
    type: str

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

ssl_client_key:
    description:
    - Content SSL client private key name attached to this product
    required: false
    type: str

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

ssl_client_cert:
    description:
    - Content SSL client certificate name attached to this product
    required: false
    type: str

Outputs

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