Tuesday, March 28, 2017

yaml format

YAML is a markup language with many powerful features

Rule 1:
YAML uses a fixed indentation scheme to represent relationships between data layers. 
Each level consists of exactly two spaces. DO NOT USE TABS.

Rule 2:

key value pair using colon.

my_key: my_value


Rule 3:

list of items
- list_value_one
- list_value_two
- list_value_three

For existing files, You can convert tabs to 2 spaces by these commands in Vim::set tabstop=2 expandtab and then :retab.

The suggested syntax for YAML files is to use 2 spaces for indentation,

source: https://docs.saltstack.com/en/latest/topics/yaml/index.html

No comments:

Post a Comment