Skip to content
Snippets Groups Projects
Commit cade7202 authored by Dónal Cunningham's avatar Dónal Cunningham
Browse files

DC - added generic ansible.cfg and put more example output in the README for inventories

parent cefc56dd
No related branches found
No related tags found
No related merge requests found
# My own config file, thank goodness!
[defaults]
host_key_checking = False
stdout_callback = yaml
inventory = hosts
nocows = True
......@@ -9,9 +9,51 @@ You can verify any of them as valid inventories with
An example command line is...
```
ansible-inventory --graph -i hosts.ini
$ ansible-inventory --graph -i hosts_with_variables.ini
@all:
|--@all_servers:
| |--@dbservers:
| | |--db1_dublin
| | |--db2_dublin
| |--@webservers:
| | |--web1_dublin
| | |--web2_dublin
|--@ungrouped:
| |--loadbalancer1
| |--veos
```
## Inventory variables
If you want to see the inventory variables too, you
will need to add ``--vars`` to the command line.
If you want to see the inventory variables too, you will need to add ``--vars`` to the command line.
```
$ ansible-inventory --graph -i hosts_with_variables.ini --vars
@all:
|--@all_servers:
| |--@dbservers:
| | |--db1_dublin
| | | |--{ansible_ssh_pass = swordfish}
| | | |--{ansible_user = zork}
| | |--db2_dublin
| | | |--{ansible_ssh_pass = swordfish}
| | | |--{ansible_user = zork}
| |--@webservers:
| | |--web1_dublin
| | | |--{ansible_ssh_pass = swordfish}
| | | |--{ansible_user = nginx_test}
| | |--web2_dublin
| | | |--{ansible_ssh_pass = swordfish}
| | | |--{ansible_user = nginx_test}
| | |--{ansible_user = nginx_test}
|--@ungrouped:
| |--loadbalancer1
| | |--{ansible_ssh_pass = swordfish}
| | |--{ansible_user = zork}
| |--veos
| | |--{ansible_host = localhost}
| | |--{ansible_port = 9022}
| | |--{ansible_ssh_pass = swordfish}
| | |--{ansible_user = zork}
|--{ansible_ssh_pass = swordfish}
|--{ansible_user = zork}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment