Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible-examples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GEANT-OAV
ansible-examples
Commits
cade7202
Commit
cade7202
authored
3 years ago
by
Dónal Cunningham
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Section1/ansible.cfg
+10
-0
10 additions, 0 deletions
Section1/ansible.cfg
Section1/inventories/README.md
+45
-3
45 additions, 3 deletions
Section1/inventories/README.md
with
55 additions
and
3 deletions
Section1/ansible.cfg
0 → 100644
+
10
−
0
View file @
cade7202
# My own config file, thank goodness!
[defaults]
host_key_checking
=
False
stdout_callback
=
yaml
inventory
=
hosts
nocows
=
True
This diff is collapsed.
Click to expand it.
Section1/inventories/README.md
+
45
−
3
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}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment