Using an Ansible playbook with the Global Registration method to register hosts to Red Hat Satellite 6.x

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

Resolution

Use the curl command generated by using the 4.3. Registering hosts by using global registration method in an Ansible Playbook like:

---
- name: Register hosts to Red Hat Satellite
  hosts: all
  tasks:
    - name: Register host to Satellite
      command: <curl_command_here>
      register: result
      until: result.rc == 0
      retries: 5
      delay: 10

Note:
When you generate the curl command, make sure that you check the unlimited check box next to the Token life time parameter under the Advanced tab. This ensures that you can continue to use the same curl command (without editing the Ansible playbook) whenever you need to register a new host.

For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues

SBR
Product(s)
Components

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.