theforeman / theforeman.foreman / 4.0.0 / module / scap_tailoring_file Manage SCAP Tailoring Files | "added in version" 1.0.0 of theforeman.foreman" Authors: Evgeni Golov (@evgeni)theforeman.foreman.scap_tailoring_file (4.0.0) — module
Install with ansible-galaxy collection install theforeman.foreman:==4.0.0
collections: - name: theforeman.foreman version: 4.0.0
Create, update, and delete SCAP Tailoring Files
- name: Create SCAP tailoring file theforeman.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: "changeme" state: present
- name: Update SCAP tailoring file theforeman.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: "changeme" state: present
- name: Delete SCAP tailoring file theforeman.foreman.scap_tailoring_file: name: "Red Hat firefox default content" server_url: "https://foreman.example.com" username: "admin" password: "changeme" state: absent
name: description: - Name of the tailoring file. required: true type: str state: choices: - present - absent default: present description: - State of the entity 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 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. - 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 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: 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 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
entity: contains: scap_tailoring_files: description: List of scap tailoring files. elements: dict type: list description: Final state of the affected entities grouped by their type. returned: success type: dict