ansible / 2.6.18 / modules / rhn_register_module.html /

rhn_register - Manage Red Hat Network registration using the rhnreg_ks command

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 Choices/Defaults Comments
activationkey
supply an activation key for use with registration
channels Default:
[]
Optionally specify a list of comma-separated channels to subscribe to upon successful registration.
enable_eus
bool
    Choices:
  • no
  • yes
If no, extended update support will be requested.
nopackages
bool

(added in 2.5)
    Choices:
  • no
  • yes
If yes, the registered node will not upload its installed packages information to Satellite server
password
Red Hat Network password
profilename
(added in 2.0)
supply an profilename for use with registration
server_url Default:
"Current value of I(serverURL) from C(/etc/sysconfig/rhn/up2date) is the default"
Specify an alternative Red Hat Network server URL
sslcacert
(added in 2.1)
supply a custom ssl CA certificate file for use with registration
state
    Choices:
  • present
  • absent
whether to register ( present), or unregister ( absent) a system
systemorgid
(added in 2.1)
supply an organizational id for use with registration
username
Red Hat Network username

Notes

Note

  • In order to register a system, rhnreg_ks requires either a username and password, or an activationkey.

Examples

# Unregister system from RHN.
- rhn_register:
    state: absent
    username: joe_user
    password: somepass

# Register as user (joe_user) with password (somepass) and auto-subscribe to available content.
- rhn_register:
    state: present
    username: joe_user
    password: somepass

# Register with activationkey (1-222333444) and enable extended update support.
- rhn_register:
    state: present
    activationkey: 1-222333444
    enable_eus: true

# Register with activationkey (1-222333444) and set a profilename which may differ from the hostname.
- rhn_register:
    state: present
    activationkey: 1-222333444
    profilename: host.example.com.custom

# Register as user (joe_user) with password (somepass) against a satellite
# server specified by (server_url).
- rhn_register:
    state: present
    username: joe_user
    password: somepass'
    server_url: https://xmlrpc.my.satellite/XMLRPC

# Register as user (joe_user) with password (somepass) and enable
# channels (rhel-x86_64-server-6-foo-1) and (rhel-x86_64-server-6-bar-1).
- rhn_register:
    state: present
    username: joe_user
    password: somepass
    channels: rhel-x86_64-server-6-foo-1,rhel-x86_64-server-6-bar-1

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • James Laska

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.6/modules/rhn_register_module.html