https://github.com/azrdev/sample-ansible-inventory-multienv
ansible inventory layout with multiple apps & environments, showcasing use of nested & intersected groups
https://github.com/azrdev/sample-ansible-inventory-multienv
Last synced: 2 months ago
JSON representation
ansible inventory layout with multiple apps & environments, showcasing use of nested & intersected groups
- Host: GitHub
- URL: https://github.com/azrdev/sample-ansible-inventory-multienv
- Owner: azrdev
- Created: 2021-01-26T13:49:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-01T10:26:50.000Z (over 4 years ago)
- Last Synced: 2025-02-07T18:54:16.755Z (4 months ago)
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
sample ansible inventory layout with multiple apps & environments,
showcasing the use of nested & intersected groupsfollows [Ansible > User Guide > Sample Ansible setup > Sample directory layout](https://docs.ansible.com/ansible/latest/user_guide/sample_setup.html#sample-directory-layout)
~~~sh
$ ansible-inventory -i . --list --yaml
~~~~~~yaml
all:
children:
appA:
children:
appA_prod:
hosts:
hostA01:
appA_listen_port: 5001
appA_portal_url_correct: https://a.example.com/
appA_portal_url_wrong: 'https://a.example.com/ (error: also in test)'
company_domain: example.com
fqdn: hostA01.example.com
reposerver: repos.example.com
appA_test:
hosts:
hostA02:
appA_listen_port: 5001
appA_portal_url_wrong: 'https://a.example.com/ (error: also in test)'
company_domain: example.com
fqdn: hostA02.example.com
reposerver: test.repos.example.com
appB:
children:
appB_prod:
hosts:
hostB01:
company_domain: example.com
reposerver: repos.example.com
appB_test:
hosts:
hostB02:
company_domain: example.com
reposerver: test.repos.example.com
appC:
children:
appC_prod:
hosts:
hostC01:
company_domain: example.com
environment: prod
reposerver: repos.example.com
appC_test:
hosts:
hostC02:
company_domain: example.com
environment: test
reposerver: test.repos.example.com
verify_certificates: false
hostC03:
company_domain: example.com
environment: test
reposerver: test.repos.example.com
verify_certificates: false
appD:
hosts:
hostD01:
company_domain: example.com
environment:
- appD_prod
- prod
reposerver: repos.example.com
hostD02:
company_domain: example.com
environment:
- appD_test
- test
reposerver: test.repos.example.com
appD_prod:
hosts:
hostD01: {}
appD_test:
hosts:
hostD02: {}
appE:
hosts:
hostE01:
Umgebung: test
company_domain: example.com
hostE02:
Umgebung: prod
company_domain: example.com
prod:
children:
appA_prod:
hosts:
hostA01: {}
appB_prod:
hosts:
hostB01: {}
hosts:
hostC01: {}
hostD01: {}
test:
children:
appA_test:
hosts:
hostA02: {}
appB_test:
hosts:
hostB02: {}
hosts:
hostC02: {}
hostC03: {}
hostD02: {}
ungrouped: {}
~~~