Deprecated

Removed in 10.0.0

i

Reason: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.

community.general.rhn_register (8.5.0) — module

Manage Red Hat Network registration using the C(rhnreg_ks) command

Authors: James Laska (@jlaska)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Manage registration to the Red Hat Network.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Unregister system from RHN
  community.general.rhn_register:
    state: absent
    username: joe_user
    password: somepass
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Register as user with password and auto-subscribe to available content
  community.general.rhn_register:
    state: present
    username: joe_user
    password: somepass
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Register with activationkey and enable extended update support
  community.general.rhn_register:
    state: present
    activationkey: 1-222333444
    enable_eus: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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

Inputs

    
force:
    default: false
    description:
    - Force registration, even if system is already registered.
    type: bool
    version_added: 2.0.0
    version_added_collection: community.general

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether to register (V(present)), or unregister (V(absent)) a system.
    type: str

ca_cert:
    aliases:
    - sslcacert
    description:
    - Supply a custom ssl CA certificate file for use with registration.
    type: path

channels:
    default: []
    description:
    - Optionally specify a list of channels to subscribe to upon successful registration.
    elements: str
    type: list

password:
    description:
    - Red Hat Network password.
    type: str

username:
    description:
    - Red Hat Network username.
    type: str

enable_eus:
    default: false
    description:
    - If V(false), extended update support will be requested.
    type: bool

nopackages:
    default: false
    description:
    - If V(true), the registered node will not upload its installed packages information
      to Satellite server.
    type: bool

server_url:
    description:
    - Specify an alternative Red Hat Network server URL.
    - The default is the current value of C(serverURL) from C(/etc/sysconfig/rhn/up2date).
    type: str

profilename:
    description:
    - Supply an profilename for use with registration.
    type: str

systemorgid:
    description:
    - Supply an organizational id for use with registration.
    type: str

activationkey:
    description:
    - Supply an activation key for use with registration.
    type: str