theforeman.foreman.foreman_scap_content (0.8.1) — module

Manage Foreman SCAP content using Foreman API.

Authors: Jameer Pathan (@jameerpathan111)

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

Create, Update and Delete Foreman SCAP content using Foreman API.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create SCAP content
  foreman_scap_content:
    title: "Red Hat firefox default content"
    scap_file: "/home/user/Downloads/ssg-firefox-ds.xml"
    original_filename: "ssg-firefox-ds.xml"
    organizations:
      - "Default Organization"
    locations:
      - "Default Location"
    server_url: "https://foreman.example.com"
    username: "admin"
    password: "secret"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Update SCAP content
  foreman_scap_content:
    title: "Red Hat firefox default content"
    updated_title: "Updated scap content title"
    scap_file: "/home/user/Downloads/updated-ssg-firefox-ds.xml"
    original_filename: "updated-ssg-firefox-ds.xml"
    organizations:
      - "Org One"
      - "Org Two"
    locations:
      - "Loc One"
      - "Loc Two"
    server_url: "https://foreman.example.com"
    username: "admin"
    password: "secret"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete SCAP content
  foreman_scap_content:
    title: "Red Hat firefox default content"
    server_url: "https://foreman.example.com"
    username: "admin"
    password: "secret"
    state: absent

Inputs

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

title:
    description:
    - Title of SCAP content.
    required: true
    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

locations:
    description: List of locations the entity should be assigned to
    elements: str
    type: list

scap_file:
    description:
    - File containing XML DataStream content.
    - Required when creating a new DataStream.
    required: false
    type: path

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

organizations:
    description: List of organizations the entity should be assigned to
    elements: str
    type: list

updated_title:
    description:
    - New SCAP content title.
    - When this parameter is set, the module will not be idempotent.
    type: str

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

original_filename:
    description:
    - Original file name of the XML file.
    - If unset, the filename of I(scap_file) will be used.
    required: false
    type: str