mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
Add YAML inventory format.
See test/yaml_hosts for an example. Hosts can be part of multiple groups. Groups can also have variables, inherited by the hosts. There is no variable scope, last variable seen wins.
This commit is contained in:
parent
54f4526160
commit
3a24aa9a70
3 changed files with 172 additions and 0 deletions
26
test/yaml_hosts
Normal file
26
test/yaml_hosts
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
|
||||
- jupiter
|
||||
- host: saturn
|
||||
vars:
|
||||
- moon: titan
|
||||
|
||||
- group: greek
|
||||
hosts:
|
||||
- zeus
|
||||
- hera
|
||||
- poseidon
|
||||
vars:
|
||||
- ansible_ssh_port: 3000
|
||||
|
||||
- group: norse
|
||||
hosts:
|
||||
- host: thor
|
||||
vars:
|
||||
- hammer: True
|
||||
- odin
|
||||
- loki
|
||||
|
||||
- group: multiple
|
||||
hosts:
|
||||
- saturn
|
Loading…
Add table
Add a link
Reference in a new issue