YAML
/ˈjæməl/, 专门用于写配置文件
YAML is easier for humans to read and write than other common data formats like XML
key/value pairs
https://docs.ansible.com/ansi...
List
All members of a list are lines beginning at the same indentation level starting with a "- " (a dash and a space):
# A list of tasty fruits
fruits:
- Apple
- Orange
- Strawberry
- Mango
或者
fruits: ['Apple', 'Orange', 'Strawberry', 'Mango']
Dictionary
A dictionary is represented in a simple key: value form (the colon must be followed by a space):
# An employee record
martin:
name: Martin D'vloper
job: Developer
skill: Elite
或者
martin: {name: Martin D'vloper, job: Developer, skill: Elite}
Boolean
likes_emacs: true
uses_cvs: false
Multiple Lines
Values can span multiple lines using | or >. Spanning multiple lines using a | will include the newlines. Using a > will ignore newlines; it’s used to make what would otherwise be a very long line easier to read and edit. In either case the indentation will be ignored. Examples are:
include_newlines: |
exactly as you see
will appear these three
lines of poetry
ignore_newlines: >
this is really a
single line of text
despite appearances
引号
foo: "somebody said I should put a colon here: so I did"
windows_drive: "c:"
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。