Added usage example
This commit is contained in:
parent
1901847443
commit
794e625f57
12
inventory
12
inventory
@ -14,6 +14,14 @@ inventory --list | --host <hostname>
|
|||||||
--list: return YAML compatible JSON inventory of all hosts
|
--list: return YAML compatible JSON inventory of all hosts
|
||||||
--host <hostname>: return YAML compatible JSON with all variables defined for the given host
|
--host <hostname>: return YAML compatible JSON with all variables defined for the given host
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
This is a completely useless example of a dynamic inventory, since it just returns the
|
||||||
|
included ini-style inventory, in JSON (or YAML). To test it do:
|
||||||
|
|
||||||
|
$ ansible -i <this file> --list-hosts <ansible host pattern: eg. all>
|
||||||
|
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
|
|
||||||
@ -93,8 +101,8 @@ __DATA__
|
|||||||
|
|
||||||
# Each group represents a role or a location
|
# Each group represents a role or a location
|
||||||
# ie.
|
# ie.
|
||||||
[default]
|
|
||||||
localhost ansible_connection=local ansible_become=False
|
localhost ansible_connection=local ansible_become=False
|
||||||
|
[default]
|
||||||
pallas.ai.rug.nl ansible_become=true ansible_ssh_user=remco
|
pallas.ai.rug.nl ansible_become=true ansible_ssh_user=remco
|
||||||
ai17873.ai.rug.nl ansible_become=true ansible_ssh_user=rwouts
|
ai17873.ai.rug.nl ansible_become=true ansible_ssh_user=rwouts
|
||||||
129.125.5.[1:255] ansible_become=true
|
129.125.5.[1:255] ansible_become=true
|
||||||
@ -126,6 +134,7 @@ lwp
|
|||||||
|
|
||||||
[groningen:vars]
|
[groningen:vars]
|
||||||
timezone=Europe/Amsterdam
|
timezone=Europe/Amsterdam
|
||||||
|
|
||||||
#Nijenbrg
|
#Nijenbrg
|
||||||
[5116.315]
|
[5116.315]
|
||||||
129.125.28.[145:166]
|
129.125.28.[145:166]
|
||||||
@ -283,4 +292,3 @@ turing18.housing.rug.nl
|
|||||||
mail.ai.rug.nl
|
mail.ai.rug.nl
|
||||||
imap.ai.rug.nl
|
imap.ai.rug.nl
|
||||||
www.ai.rug.nl
|
www.ai.rug.nl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user