Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible package. 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.
To use it in a playbook, specify: community.general.rhn_register.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| activationkey string | Supply an activation key for use with registration. | |
| ca_cert path | Supply a custom ssl CA certificate file for use with registration. aliases: sslcacert | |
| channels list / elements=string | Default: [] | Optionally specify a list of channels to subscribe to upon successful registration. |
| enable_eus boolean |
| If no, extended update support will be requested. |
| force boolean added in 2.0.0 of community.general |
| Force registration, even if system is already registered. |
| nopackages boolean |
| If yes, the registered node will not upload its installed packages information to Satellite server. |
| password string | Red Hat Network password. | |
| profilename string | Supply an profilename for use with registration. | |
| server_url string | Specify an alternative Red Hat Network server URL. The default is the current value of serverURL from /etc/sysconfig/rhn/up2date. | |
| state string |
| Whether to register ( present), or unregister (absent) a system. |
| systemorgid string | Supply an organizational id for use with registration. | |
| username string | Red Hat Network username. |
Note
rhnreg_ks requires either a username and password, or an activationkey.- 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: yes
- 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: yes
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/rhn_register_module.html