updated better yaml host examples

This commit is contained in:
Brian Coca 2017-03-08 14:51:38 -05:00
parent 41f5648c44
commit ced73389de

View file

@ -4,15 +4,16 @@
# #
# - Comments begin with the '#' character # - Comments begin with the '#' character
# - Blank lines are ignored # - Blank lines are ignored
# - Top level entries are assumed to be groups # - Top level entries are assumed to be groups, start with 'all' to have a full hierchy
# - Hosts must be specified in a group's hosts: # - Hosts must be specified in a group's hosts:
# and they must be a key (: terminated) # and they must be a key (: terminated)
# - groups can have children, hosts and vars keys # - groups can have children, hosts and vars keys
# - Anything defined under a hosts is assumed to be a var # - Anything defined under a hosts is assumed to be a var
# - You can enter hostnames or ip addresses # - You can enter hostnames or ip addresses
# - A hostname/ip can be a member of multiple groups # - A hostname/ip can be a member of multiple groups
# Ex 1: Ungrouped hosts, put in 'ungrouped' group
##ungrouped: # Ex 1: Ungrouped hosts, put in 'all' or 'ungrouped' group
##all:
## hosts: ## hosts:
## green.example.com: ## green.example.com:
## ansible_ssh_host: 191.168.100.32 ## ansible_ssh_host: 191.168.100.32
@ -21,8 +22,8 @@
## 192.168.100.10: ## 192.168.100.10:
# Ex 2: A collection of hosts belonging to the 'webservers' group # Ex 2: A collection of hosts belonging to the 'webservers' group
## children:
##webservers: ## webservers:
## hosts: ## hosts:
## alpha.example.org: ## alpha.example.org:
## beta.example.org: ## beta.example.org:
@ -32,7 +33,7 @@
# Ex 3: You can create hosts using ranges and add children groups and vars to a group # Ex 3: You can create hosts using ranges and add children groups and vars to a group
# The child group can define anything you would normally add to a group # The child group can define anything you would normally add to a group
##testing: ## testing:
## hosts: ## hosts:
## www[001:006].example.com: ## www[001:006].example.com:
## vars: ## vars:
@ -41,3 +42,9 @@
## webservers: ## webservers:
## hosts: ## hosts:
## beta.example.org: ## beta.example.org:
# Ex 4: all vars
# keeping withing 'all' group you can define common 'all' vars here with lowest precedence
## vars:
## commontoall: thisvar