/ansible-tower-inventory

Generates inventory that Ansible can understand by making API request to Ansible Tower.

Primary LanguagePythonMIT LicenseMIT

ansible-tower-inventory

Generates inventory that Ansible can understand by making API request to Ansible Tower.

Usage:

  • Set the following environment variables:
  • List available tower inventories tower-inventory.py --list-inventories

  • Set the TOWER_INVENTORY_ID environment variable with the id of the inventory you would like to use

  • List available tower inventories: tower-inventory.py --list-inventories

  • Set the TOWER_INVENTORY_ID environment variable with the id of the inventory you would like to use

  • Make sure tower_inventory.py is executeable and use it as an inventory file. E.g.: ansible all -i tower_inventory.py -m ping