New in version 2.7.
| Parameter | Choices/Defaults | Configuration | Comments |
|---|---|---|---|
| host string required | env:TOWER_HOST | The network address of your Ansible Tower host. | |
| inventory_id string required | env:TOWER_INVENTORY | The ID of the Ansible Tower inventory that you wish to import. | |
| password string required | env:TOWER_PASSWORD | The password for your Ansible Tower user. | |
| plugin required |
| env:ANSIBLE_INVENTORY_ENABLED | the name of this plugin, it should always be set to 'tower' for this plugin to recognize it as it's own. |
| username string required | env:TOWER_USERNAME | The user that you plan to use to access inventories on Ansible Tower. | |
| verify_ssl bool |
| env:TOWER_VERIFY_SSL | Specify whether Ansible should verify the SSL certificate of Ansible Tower host. |
# Before you execute the following commands, you should make sure this file is in your plugin path, # and you enabled this plugin. # Example for using tower_inventory.yml file plugin: tower host: your_ansible_tower_server_network_address username: your_ansible_tower_username password: your_ansible_tower_password inventory_id: the_ID_of_targeted_ansible_tower_inventory # Then you can run the following command. # If some of the arguments are missing, Ansible will attempt to read them from environment variables. # ansible-inventory -i /path/to/tower_inventory.yml --list # Example for reading from environment variables: # Set environment variables: # export TOWER_HOST=YOUR_TOWER_HOST_ADDRESS # export TOWER_USERNAME=YOUR_TOWER_USERNAME # export TOWER_PASSWORD=YOUR_TOWER_PASSWORD # export TOWER_INVENTORY=THE_ID_OF_TARGETED_INVENTORY # Read the inventory specified in TOWER_INVENTORY from Ansible Tower, and list them. # The inventory path must always be @tower_inventory if you are reading all settings from environment variables. # ansible-inventory -i @tower_inventory --list
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/plugins/inventory/tower.html