theforeman / theforeman.foreman / 4.0.0 / module / operatingsystem Manage Operating Systems | "added in version" 1.0.0 of theforeman.foreman" Authors: Matthias M Dellweg (@mdellweg) ATIX AG, Bernhard Hopfenmüller (@Fobhep) ATIX AGtheforeman.foreman.operatingsystem (4.0.0) — module
Install with ansible-galaxy collection install theforeman.foreman:==4.0.0
collections: - name: theforeman.foreman version: 4.0.0
Manage Operating Systems
- name: "Create an Operating System" theforeman.foreman.operatingsystem: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: Debian release_name: stretch family: Debian major: 9 parameters: - name: additional-packages value: python vim state: present
- name: "Ensure existence of an Operating System (provide default values)" theforeman.foreman.operatingsystem: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: Centos family: Redhat major: 7 password_hash: SHA256 state: present_with_defaults
- name: "Delete an Operating System" theforeman.foreman.operatingsystem: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: Debian family: Debian major: 9 state: absent
name: description: - Name of the Operating System required: true type: str major: description: - major version of the Operating System required: false type: str media: description: - list of installation media elements: str required: false type: list minor: description: - minor version of the Operating System 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 ptables: description: - list of partitioning tables elements: str required: false type: list 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 os_family: aliases: - family choices: - AIX - Altlinux - Archlinux - Coreos - Debian - Fcos - Freebsd - Gentoo - Junos - NXOS - Rancheros - Redhat - Rhcos - Solaris - Suse - VRP - Windows - Xenserver description: - Distribution family of the Operating System required: false type: str parameters: description: - Operating System specific host parameters elements: dict required: false suboptions: name: description: - Name of the parameter required: true type: str parameter_type: choices: - string - boolean - integer - real - array - hash - yaml - json default: string description: - Type of the parameter type: str value: description: - Value of the parameter required: true type: raw 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 Operating System required: false type: str release_name: description: - Release name of the operating system (recommended for debian) type: str updated_name: description: New operating system name. When this parameter is set, the module will not be idempotent. type: str architectures: description: - architectures, the operating system can be installed on elements: str required: false type: list password_hash: choices: - MD5 - SHA256 - SHA512 - Base64 - Base64-Windows description: - hashing algorithm for passwd 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 provisioning_templates: description: - List of provisioning templates that are associated with the operating system. - Specify the full list of template names you want to associate with your OS. - For example ["Kickstart default", "Kickstart default finish", "Kickstart default iPXE", "custom"]. - After specifying the template associations, you can set the default association in - the M(theforeman.foreman.os_default_template) module. elements: str required: false type: list
entity: contains: operatinsystems: description: List of operatinsystems. elements: dict type: list description: Final state of the affected entities grouped by their type. returned: success type: dict