The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
---|---|---|
activationkey
|
|
supply an activation key for use with registration
|
auto_attach
(added in 2.5) |
|
Upon successful registration, auto-consume available subscriptions
Added in favor of depracated autosubscribe in 2.5.
aliases: autosubscribe |
consumer_id
(added in 2.1) |
|
References an existing consumer ID to resume using a previous registration
for this system. If the system's identity certificate is lost or corrupted,
this option allows it to resume using its previous identity and subscriptions.
The default is to not specify a consumer ID so a new ID is created.
|
consumer_name
(added in 2.1) |
|
Name of the system to register, defaults to the hostname
|
consumer_type
(added in 2.1) |
|
The type of unit to register, defaults to system
|
environment
(added in 2.2) |
|
Register with a specific environment in the destination org. Used with Red Hat Satellite 6.x or Katello
|
force_register
(added in 2.2) |
|
Register the system even if it is already registered
|
org_id
(added in 2.0) |
|
Organization ID to use in conjunction with activationkey
|
password
|
|
access.redhat.com or Sat6 password
|
pool
|
Default:
^$
|
Specify a subscription pool name to consume. Regular expressions accepted. Use pool_ids instead if
possible, as it is much faster. Mutually exclusive with pool_ids.
|
pool_ids
(added in 2.4) |
Default:
[]
|
Specify subscription pool IDs to consume. Prefer over pool when possible as it is much faster.
A pool ID may be specified as a
string - just the pool ID (ex. 0123456789abcdef0123456789abcdef ),
or as a dict with the pool ID as the key, and a quantity as the value (ex.
0123456789abcdef0123456789abcdef: 2 . If the quantity is provided, it is used to consume multiple
entitlements from a pool (the pool must support this). Mutually exclusive with pool.
|
rhsm_baseurl
|
|
Specify CDN baseurl
|
server_hostname
|
|
Specify an alternative Red Hat Subscription Management or Sat6 server
|
server_insecure
|
|
Enable or disable https server certificate verification when connecting to
server_hostname |
server_proxy_hostname
(added in 2.4) |
|
Specify a HTTP proxy hostname
|
server_proxy_password
(added in 2.4) |
|
Specify a password for HTTP proxy with basic authentication
|
server_proxy_port
(added in 2.4) |
|
Specify a HTTP proxy port
|
server_proxy_user
(added in 2.4) |
|
Specify a user for HTTP proxy with basic authentication
|
state
|
|
whether to register and subscribe (
present ), or unregister (absent ) a system |
username
|
|
access.redhat.com or Sat6 username
|
Note
- name: Register as user (joe_user) with password (somepass) and auto-subscribe to available content.
redhat_subscription:
state: present
username: joe_user
password: somepass
auto_attach: true
- name: Same as above but subscribe to a specific pool by ID.
redhat_subscription:
state: present
username: joe_user
password: somepass
pool_ids: 0123456789abcdef0123456789abcdef
- name: Register and subscribe to multiple pools.
redhat_subscription:
state: present
username: joe_user
password: somepass
pool_ids:
- 0123456789abcdef0123456789abcdef
- 1123456789abcdef0123456789abcdef
- name: Same as above but consume multiple entitlements.
redhat_subscription:
state: present
username: joe_user
password: somepass
pool_ids:
- 0123456789abcdef0123456789abcdef: 2
- 1123456789abcdef0123456789abcdef: 4
- name: Register and pull existing system data.
redhat_subscription:
state: present
username: joe_user
password: somepass
consumer_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- name: Register with activationkey and consume subscriptions matching Red Hat Enterprise Server or Red Hat Virtualization
redhat_subscription:
state: present
activationkey: 1-222333444
org_id: 222333444
pool: '^(Red Hat Enterprise Server|Red Hat Virtualization)$'
- name: Update the consumed subscriptions from the previous example (remove Red Hat Virtualization subscription)
redhat_subscription:
state: present
activationkey: 1-222333444
org_id: 222333444
pool: '^Red Hat Enterprise Server$'
- name: Register as user credentials into given environment (against Red Hat Satellite 6.x), and auto-subscribe.
redhat_subscription:
state: present
username: joe_user
password: somepass
environment: Library
auto_attach: true
Common return values are documented here, the following are the fields unique to this module:
Key |
Returned |
Description |
---|---|---|
subscribed_pool_ids
complex
|
success |
List of pool IDs to which system is now subscribed
|
8a85f9815ab905d3015ab928c7005de4
|
|
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.