BASICS OF YAML
Ansible uses YAML syntax to represent Ansible playbooks. This chapter provides an overview of YAML. Ansible uses YAML because it is easier for humans to understand, read and write than other data formats such as XML and JSON.
All YAML files can be selected to start with "---" and end with "....
In this section, you will learn about the different representations of YAML data.
YAML uses simple key-value pairs to represent data. The dictionary is represented by a key-value pair.
Note: A space is required between the and values.
Example: Student Records
---#Optional YAML startup syntax
Name: Steeve John
Role number: 17
... #Option YAML exit grammar
You can also use abbreviation to represent dictionaries.
You can also represent a list in YAML. All elements (members) of the list should be written on a new line with the same indentation beginning with "-" (- and spaces).