summaryrefslogtreecommitdiffstats
path: root/examples/hosts.yaml
blob: 02f879010ddba2ac8d40f016699f82d959630aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This is the default ansible 'hosts' file.
#
# It should live in /etc/ansible/hosts
#
#   - Comments begin with the '#' character
#   - Blank lines are ignored
#   - Top level entries are assumed to be groups, start with 'all' to have a full hierarchy
#   - Hosts must be specified in a group's hosts:
#     and they must be a key (: terminated)
#   - groups can have children, hosts and vars keys
#   - Anything defined under a host is assumed to be a var
#   - You can enter hostnames or IP addresses
#   - A hostname/IP can be a member of multiple groups

# Ex 1: Ungrouped hosts, put them in 'all' or 'ungrouped' group
##all:
##  hosts:
##      green.example.com:
##          ansible_ssh_host: 191.168.100.32
##          anyvariable: value
##      blue.example.com:
##      192.168.100.1:
##      192.168.100.10:

# Ex 2: A collection of hosts belonging to the 'webservers' group
##  children:
##    webservers:
##      hosts:
##        alpha.example.org:
##        beta.example.org:
##        192.168.1.100:
##        192.168.1.110:

# 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

##    testing:
##      hosts:
##        www[001:006].example.com:
##      vars:
##        testing1: value1
##      children:
##        webservers:
##            hosts:
##                beta.example.org:

# Ex 4: all vars
# keeping within 'all' group you can define common 'all' vars here with lowest precedence

##  vars:
##      commontoall: thisvar