Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.96 KB | None | 0 0
  1. all: # keys must be unique, i.e. only one 'hosts' per group
  2.     hosts:
  3.         test1:
  4.         test2:
  5.             host_var: value
  6.     vars:
  7.         group_all_var: value
  8.     children:  # key order does not matter, indentation does
  9.         other_group:
  10.             children:
  11.                 group_x:
  12.                     hosts:
  13.                        test5   # Note that one machine will work without a colon
  14.                 #group_x:
  15.                 #    hosts:
  16.                 #        test5  # But this won't
  17.                 #        test7  #
  18.                 group_y:
  19.                     hosts:
  20.                         test6: # So always use a colon
  21.             vars:
  22.                 g2_var2: value3
  23.             hosts:
  24.                 test4:
  25.                     ansible_host: 127.0.0.1
  26.         last_group:
  27.             hosts:
  28.                test1 # same host as above, additional group membership
  29.             vars:
  30.                 group_last_var: value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement