redhat.satellite.hostgroup – Manage Hostgroups¶
Note
This plugin is part of the redhat.satellite collection (version 1.5.1).
To install it use: ansible-galaxy collection install redhat.satellite
.
To use it in a playbook, specify: redhat.satellite.hostgroup
.
New in version 1.0.0: of redhat.satellite
Parameters¶
Examples¶
- name: "Create a Hostgroup"
redhat.satellite.hostgroup:
name: "new_hostgroup"
architecture: "architecture_name"
operatingsystem: "operatingsystem_name"
medium: "media_name"
ptable: "Partition_table_name"
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: present
- name: "Update a Hostgroup"
redhat.satellite.hostgroup:
name: "new_hostgroup"
architecture: "updated_architecture_name"
operatingsystem: "updated_operatingsystem_name"
organizations:
- Org One
- Org Two
locations:
- Loc One
- Loc Two
- Loc One/Nested loc
medium: "updated_media_name"
ptable: "updated_Partition_table_name"
root_pass: "password"
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: present
- name: "My nested hostgroup"
redhat.satellite.hostgroup:
parent: "new_hostgroup"
name: "my nested hostgroup"
- name: "My hostgroup with some proxies"
redhat.satellite.hostgroup:
name: "my hostgroup"
environment: production
puppet_proxy: puppet-proxy.example.com
puppet_ca_proxy: puppet-proxy.example.com
openscap_proxy: openscap-proxy.example.com
- name: "My katello related hostgroup"
redhat.satellite.hostgroup:
organization: "My Org"
name: "kt hostgroup"
content_source: capsule.example.com
lifecycle_environment: "Production"
content_view: "My content view"
parameters:
- name: "kt_activation_keys"
value: "my_prod_ak"
- name: "Delete a Hostgroup"
redhat.satellite.hostgroup:
name: "new_hostgroup"
server_url: "https://satellite.example.com"
username: "admin"
password: "changeme"
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | |
---|---|---|---|
entity
dictionary
|
success |
Final state of the affected entities grouped by their type.
|
|
hostgroups
list
/ elements=dictionary
|
success |
List of hostgroups.
|
Authors¶
Manisha Singhal (@Manisha15) ATIX AG
Baptiste Agasse (@bagasse)