redhat.satellite.operatingsystem module – Manage Operating Systems
Note
This module is part of the redhat.satellite collection (version 3.11.0).
To install it, use: ansible-galaxy collection install redhat.satellite.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: redhat.satellite.operatingsystem.
New in redhat.satellite 1.0.0
Synopsis
- Manage Operating Systems 
Aliases: foreman_operatingsystem
Requirements
The below requirements are needed on the host that executes this module.
- requests 
Parameters
| Parameter | Comments | 
|---|---|
| architectures, the operating system can be installed on | |
| Description of the Operating System | |
| major version of the Operating System | |
| list of installation media | |
| minor version of the Operating System | |
| Name of the Operating System | |
| Distribution family of the Operating System Choices: 
 | |
| Operating System specific host parameters | |
| Name of the parameter | |
| Type of the parameter Choices: 
 | |
| Value of the parameter | |
| Password of the user accessing the Foreman server. If the value is not specified in the task, the value of environment variable  | |
| hashing algorithm for passwd Choices: 
 | |
| 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 redhat.satellite.os_default_template module. | |
| list of partitioning tables | |
| Release name of the operating system (recommended for debian) | |
| URL of the Foreman server. If the value is not specified in the task, the value of environment variable  | |
| State of the entity 
 Choices: 
 | |
| New operating system name. When this parameter is set, the module will not be idempotent. | |
| Username accessing the Foreman server. If the value is not specified in the task, the value of environment variable  | |
| 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  Choices: 
 | 
Attributes
| Attribute | Support | Description | 
|---|---|---|
| Support: full | Can run in check_mode and return changed status prediction without modifying the entity | |
| Support: full | Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode | 
Examples
- name: "Create an Operating System"
  redhat.satellite.operatingsystem:
    username: "admin"
    password: "changeme"
    server_url: "https://satellite.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)"
  redhat.satellite.operatingsystem:
    username: "admin"
    password: "changeme"
    server_url: "https://satellite.example.com"
    name: Centos
    family: Redhat
    major: 7
    password_hash: SHA256
    state: present_with_defaults
- name: "Delete an Operating System"
  redhat.satellite.operatingsystem:
    username: "admin"
    password: "changeme"
    server_url: "https://satellite.example.com"
    name: Debian
    family: Debian
    major: 9
    state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Description | 
|---|---|
| Final state of the affected entities grouped by their type. Returned: success | |
| List of operatinsystems. Returned: success |