community.general.rhn_register module – Manage Red Hat Network registration using the rhnreg_ks
command
Note
This module is part of the community.general collection (version 9.4.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.rhn_register
.
DEPRECATED
- Removed in:
version 10.0.0
- Why:
RHN hosted at redhat.com was discontinued years ago, and Spacewalk 5 (which uses RHN) is EOL since 2020, May 31st; while this module could work on Uyuni / SUSE Manager (fork of Spacewalk 5), we have not heard about anyone using it in those setups.
- Alternative:
Contact the community.general maintainers to report the usage of this module, and potentially step up to maintain it.
Synopsis
Manage registration to the Red Hat Network.
Requirements
The below requirements are needed on the host that executes this module.
rhnreg_ks
either libxml2 or lxml
Parameters
Parameter |
Comments |
---|---|
Supply an activation key for use with registration. |
|
Supply a custom ssl CA certificate file for use with registration. |
|
Optionally specify a list of channels to subscribe to upon successful registration. Default: |
|
If Choices:
|
|
Force registration, even if system is already registered. Choices:
|
|
If Choices:
|
|
Red Hat Network password. |
|
Supply an profilename for use with registration. |
|
Specify an alternative Red Hat Network server URL. The default is the current value of |
|
Whether to register ( Choices:
|
|
Supply an organizational id for use with registration. |
|
Red Hat Network username. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
This is for older Red Hat products. You probably want the community.general.redhat_subscription module instead.
In order to register a system,
rhnreg_ks
requires either a username and password, or an activationkey.
Examples
- name: Unregister system from RHN
community.general.rhn_register:
state: absent
username: joe_user
password: somepass
- name: Register as user with password and auto-subscribe to available content
community.general.rhn_register:
state: present
username: joe_user
password: somepass
- name: Register with activationkey and enable extended update support
community.general.rhn_register:
state: present
activationkey: 1-222333444
enable_eus: true
- name: Register with activationkey and set a profilename which may differ from the hostname
community.general.rhn_register:
state: present
activationkey: 1-222333444
profilename: host.example.com.custom
- name: Register as user with password against a satellite server
community.general.rhn_register:
state: present
username: joe_user
password: somepass
server_url: https://xmlrpc.my.satellite/XMLRPC
- name: Register as user with password and enable channels
community.general.rhn_register:
state: present
username: joe_user
password: somepass
channels: rhel-x86_64-server-6-foo-1,rhel-x86_64-server-6-bar-1
- name: Force-register as user with password to ensure registration is current on server
community.general.rhn_register:
state: present
username: joe_user
password: somepass
server_url: https://xmlrpc.my.satellite/XMLRPC
force: true
Status
This module will be removed in version 10.0.0. [deprecated]
For more information see DEPRECATED.