-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathYAML Basics.txt
More file actions
47 lines (39 loc) · 1.47 KB
/
YAML Basics.txt
File metadata and controls
47 lines (39 loc) · 1.47 KB
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
Flow Style
--------------
host: sandbox3.local
datacenter: { location: Herndon , rack: 7 , row: 1 }
roles: [ webserver , database ]
Block Style
--------------
%TAG ! tag:hostdata:alx: # setting a local tag
--- # Multi-Document Stream - Alexandria host data
host: sandbox.local
datacenter:
location: ! ALX Alexandria
rack: !!str 6 #changes data-type to string w/o using quotes
row: 1
roles: &wphost # the anchor allows me to reuse data in my file
- webserver
- database
downtime_sch: | # use | for literal style; uses new lines
2018-10-31 - kernal upgrade
2019-02-02 - security fix
comments: > # use > for folded style; replaces newlines with spaces
Experience high I/O
since 2018-10-01.
Currently investigating.
--- # Next Document
host: sandbox2.local
datacenter:
location: Alexandria
rack: 6
row: 2
... # End of Alexandria Data Stream. Signals the end of the this document without closing the data stream
--- # Next Document
host: sandbox3.local # Washington DC host data
datacenter:
location: Washington DC
rack: 1
row: 1
roles: *wphost # this will inherit the values of my anchor above
... # End of Washington DC Data Stream