Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GEANT-OAV
ansible-examples
Commits
cade7202
Commit
cade7202
authored
Dec 08, 2021
by
Dónal Cunningham
Browse files
DC - added generic ansible.cfg and put more example output in the README for inventories
parent
cefc56dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Section1/ansible.cfg
0 → 100644
View file @
cade7202
# My own config file, thank goodness!
[defaults]
host_key_checking = False
stdout_callback = yaml
inventory = hosts
nocows = True
Section1/inventories/README.md
View file @
cade7202
...
...
@@ -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}
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment