YAML
#
YAMLYet Another Markup Language
2001
Natural and Meaningful (Human Readable)
DataTypes
- Scalars, Lists, Arrays
Data Structures
- Indentation, dahses, colons
Common uses
- Config files
- Storing data
YAML only supports spaces Supports Unicode
Two styles:
- Block styles Better for humans Less Compact
- Flow styles Compact, extension of json, folding, tags and anchors
#
Mappings, Sequences#
ScalarsString, number, or boolean
String: '' or "", double string allows for escape sequence Multiline: | or > Lots of multiline string
#
StructuresYou can add multiple directives/documents in one files
add ---
to the top of file when building multidocument file
e.g.
#
Comments#
Tags- Setting a cstom URI
- Setting local tags
- Setting a data type
#
AnchorsAnchors allow to store and reuse data
Wrote a simple YAML file for ansible to install MariaDB