https://github.com/alancoding/tower-cluster-inventory
An Ansible inventory plugin to return the inventory of a live Tower cluster
https://github.com/alancoding/tower-cluster-inventory
Last synced: 4 months ago
JSON representation
An Ansible inventory plugin to return the inventory of a live Tower cluster
- Host: GitHub
- URL: https://github.com/alancoding/tower-cluster-inventory
- Owner: AlanCoding
- License: mit
- Created: 2019-08-28T02:09:17.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-28T12:36:53.000Z (almost 6 years ago)
- Last Synced: 2025-01-03T05:38:43.277Z (6 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### tower-cluster-inventory
An Ansible inventory plugin to return the inventory of a live Tower clusterUse `ansible-inventory` to view the contents that the inventory produces.
```
ansible-inventory -i tower_cluster.yml --list --export --playbook-dir=.
```#### View Plugin Documentation
Use `ansible-doc` to view the documentation.
The search path must be set for this to work. That's due to some very technical
historical issues related to bootstrapping the search paths without a playbook
directory available.```
ANSIBLE_INVENTORY_PLUGINS=inventory_plugins ansible-doc -t inventory tower_cluster
```#### Run Playbook Against Inventory
Run a playbook with this inventory.
```
ansible-playbook -i tower_cluster.yml playbook.yml
```#### Inventory Parsing Failures
This is what happens when you run a playbook and all the parsers failed
to parse the inventory.```
ansible-playbook -i bad.tower_cluster.yml playbook.yml
```Make it a failure:
```
ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED=True ansible-playbook -i bad.tower_cluster.yml playbook.yml
```