YAML is a format used to express data sequences and is highly readable due to the reference to many other languages. YAML is the abbreviation for Yaml Ain ' t Markup language. The characteristics are as follows: 1. Good readability, easy to implement; 2. Strong expression ability, extensibility number; 3. Good interactivity with scripting language; 4. There is a consistent information model; 5. You can process it based on a stream. YAML syntax Yaml is similar to other languages, and can also express hash lists, scalar data structures, and so on. Where: the structure (structure) is displayed by a space, and the items in the sequence (sequence) are represented by "-", and the key values in the map are divided by ":". The Yaml file extension is typically: YAML basic syntax rule: 1. Case sensitive 2. Use indentation to represent a hierarchical relationship 3. The TAB key is not allowed when indenting, only spaces 4 are allowed. The number of spaces indented is not important, as long as the elements of the same hierarchy are aligned to the left of the data structures that YAML supports: 1. Object: A collection of key-value pairs, also known as mappings (mapping)/hash (hashes)/dictionary (dictionary) for example:
name:Example Developer 键:值
2. Arrays: A set of sequential values, also known as sequences (sequence)/lists (list) such as:
-Apple-Orange
3. Pure quantity: A single, non-divided value such as:
number:12.30sure:true
YAML Example:
name:Johnage:18name:Jerryage:25people:-name:John age:18 -name:Jerry age:25
Ansible Automated Transport Koriyuki YAML Introduction