Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 20.3 KB

rhsm_subscription.rst

File metadata and controls

84 lines (65 loc) · 20.3 KB

Red Hat Subscription

Required Parameters

Variable Default, Choices Description
redhat_subscription_method portal, satellite Method to use for activation of subscription management. If Satellite, the role will determine the Satellite Server version (5 or 6) and take the appropriate registration actions.
redhat_subscription_release RHEL release version (e.g. 8.1)
redhat_subscription_force_register false, true Register the system even if it is already registered.
redhat_subscription_pool_ids Specify subscription pool IDs to consume.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. If the quantity is provided, it is used to consume multiple entitlements from a pool (the pool must support this).
redhat_subscription_repos The list of repositories to enable or disable.When providing multiple values, a YAML list or a comma separated list are accepted.
redhat_subscription_repos_state enabled, disabled The state of all repos in redhat_subscription_repos.
redhat_subscription_repos_purge false, true This parameter disables all currently enabled repositories that are not not specified in redhat_subscription_repos. Only set this to true if the redhat_subscription_repos field has multiple repos.
redhat_subscription_server_hostname subscription.rhn.redhat.com FQDN of subscription serverMandatory field if redhat_subscription_method is set to satellite
redhat_subscription_port 443, 8443 Port to use when connecting to subscription server.Set 443 for Satellite or RHN. If capsule is used, set 8443.
redhat_subscription_insecure false, true Disable certificate validation.
redhat_subscription_ssl_verify_depth 3 Sets the number of certificates which should be used to verify the servers identity.This is an advanced control which can be used to secure on premise installations.
redhat_subscription_proxy_proto http, https Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the protocol for the reverse proxy.
redhat_subscription_proxy_hostname Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service.
redhat_subscription_proxy_port Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the username for the reverse proxy.
redhat_subscription_proxy_user Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the username for the reverse proxy.
redhat_subscription_proxy_password Set this to a non-blank value if subscription-manager should use a reverse proxy to access the subscription service. This sets the password for the reverse proxy.
redhat_subscription_baseurl https://cdn.redhat.com This setting is the prefix for all content which is managed by the subscription service.This should be the hostname for the Red Hat CDN, the local Satellite or Capsule depending on your deployment. This field is mandatory if redhat_subscription_method is set to satellite
redhat_subscription_manage_repos true, false Set this to true if subscription manager should manage a yum repos file. If set, it will manage the file /etc/yum.repos.d/redhat.repo .If set to false, the subscription is only used for tracking purposes, not content. The /etc/yum.repos.d/redhat.repo file will either be purged or deleted.
redhat_subscription_full_refresh_on_yum false, true Set to true if the /etc/yum.repos.d/redhat.repo should be updated with every server command. This will make yum less efficient, but can ensure that the most recent data is brought down from the subscription service.
redhat_subscription_report_package_profile true, false Set to true if rhsmcertd should report the system’s current package profile to the subscription service. This report helps the subscription service provide better errata notifications.
redhat_subscription_cert_check_interval 240 The number of minutes between runs of the rhsmcertd daemon.
redhat_subscription_auto_attach_interval 1440 The number of minutes between attempts to run auto-attach on this consumer.

Before running omnia.yml, it is mandatory that red hat subscription be set up on compute nodes running RHEL.

  • To set up Red hat subscription, fill in the rhsm_config.yml file. Once it's filled in, run the template using Ansible.
  • The flow of the playbook will be determined by the value of redhat_subscription_method in rhsm_config.yml.

    • If redhat_subscription_method is set to portal, pass the values username and password. For CLI, run the command: :

      cd utils
      ansible-playbook rhsm_subscription.yml -i inventory -e redhat_subscription_username= "<username>" -e redhat_subscription_password="<password>"
    • If redhat_subscription_method is set to satellite, pass the values organizational identifier and activation key. For CLI, run the command: :

      cd utils
      ansible-playbook rhsm_subscription.yml -i inventory -e redhat_subscription_activation_key= "<activation-key>" -e redhat_subscription_org_id ="<org-id>"

Where the inventory refers to a file listing all manager and compute nodes per the format provided in inventory file.

Red Hat Unsubscription

To disable subscription on RHEL nodes, the red_hat_unregister_template has to be called: :

cd utils
ansible_playbook rhsm_unregister.yml -i inventory