@ -40,21 +40,21 @@ A dictionary is represented in a simple ``key: value`` form (the colon must be f
# An employee record
martin:
name: Martin D'vloper
job: Developer
skill: Elite
name: Martin D'vloper
job: Developer
skill: Elite
More complicated data structures are possible, such as lists of dictionaries, dictionaries whose values are lists or a mix of both::
# Employee records
- martin:
- martin:
name: Martin D'vloper
job: Developer
skills:
- python
- perl
- pascal
- tabitha:
- tabitha:
name: Tabitha Bitumen
job: Developer
skills:
@ -80,6 +80,8 @@ Ansible doesn't really use these too much, but you can also specify a boolean va
likes_emacs: TRUE
uses_cvs: false
Use lowercase 'true' or 'false' for boolean values in dictionaries if you want to be compatible with default yamllint options.
Values can span multiple lines using ``|`` or ``>``. Spanning multiple lines using a "Literal Block Scalar" ``|`` will include the newlines and any trailing spaces.
Using a "Folded Block Scalar" ``>`` will fold newlines to spaces; 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.
@ -117,18 +119,18 @@ This really has nothing to do with Ansible, but will give you a feel for the for
skill: Elite
employed: True
foods:
- Apple
- Orange
- Strawberry
- Mango
- Apple
- Orange
- Strawberry
- Mango
languages:
perl: Elite
python: Elite
pascal: Lame
perl: Elite
python: Elite
pascal: Lame
education: |
4 GCSEs
3 A-Levels
BSc in the Internet of Things
4 GCSEs
3 A-Levels
BSc in the Internet of Things
That's all you really need to know about YAML to start writing `Ansible` playbooks.