theforeman.foreman.foreman_scap_tailoring_file (0.8.1) — module

Manage Foreman SCAP tailoring files using Foreman API.

Authors: Evgeni Golov (@evgeni)

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 tailoring files using Foreman API.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create SCAP tailoring file
  foreman_scap_tailoring_file:
    name: "Red Hat firefox default content"
    scap_file: "/home/user/Downloads/ssg-firefox-ds-tailoring.xml"
    original_filename: "ssg-firefox-ds-tailoring.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 tailoring file
  foreman_scap_tailoring_file:
    name: "Red Hat firefox default content"
    updated_name: "Updated tailoring file name"
    scap_file: "/home/user/Downloads/updated-ssg-firefox-ds-tailoring.xml"
    original_filename: "updated-ssg-firefox-ds-tailoring.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 tailoring file
  foreman_scap_tailoring_file:
    name: "Red Hat firefox default content"
    server_url: "https://foreman.example.com"
    username: "admin"
    password: "secret"
    state: absent

Inputs

    
name:
    description:
    - Name of the tailoring file.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the entity in Foreman
    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

updated_name:
    description:
    - New name of the tailoring file.
    - When this parameter is set, the module will not be idempotent.
    type: str

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

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