How do I Enable "want_hostcollections=true" for Red Hat Satellite 6 Inventory in Ansible Tower?

Solution Verified - Updated

Environment

Ansible Tower <= 3.2.x

Issue

How do I enable "want_hostcollections=true" for Red Hat Satellite 6 Inventory in Ansible Tower?

Resolution

# cd /etc/ansible
# vim foreman.ini (now copy the contents from this [link](https://raw.githubusercontent.com/ansible/ansible/devel/contrib/inventory/foreman.ini))
# chmod 644 foreman.ini (we need to make sure that awx user can read it)
  • Change the values in the foreman.ini file with your credentials and other values that you want.

  • Create a Custom Script in Tower by following the below steps:

    1. From Settings click INVENTORY SCRIPTS
    2. Copy the contents from this Content from raw.githubusercontent.com is not included.link and paste it in CUSTOM SCRIPT
    3. Then, Click save.
  • Now, create a new inventory and then navigate to SOURCES tab.

  • Choose Custom Script from the dropdown list.

  • Select the Custom Script that you created.

  • Lastly, add the path to foreman.ini path in SOURCE VARIABLES like below:

FOREMAN_INI_PATH: /etc/ansible/foreman.ini
  • After this please make sure the Job Isolation is off, you can switch that off by going to Settings -> Configure Tower -> Jobs tab, toggle off the job isolation.

  • Finally sync the inventory and see if it works.

SBR

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.