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:
colons:

key value pair using colon.

my_key: my_value

my_key:
  my_value

Rule 3:
Dashes

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,
https://docs.saltstack.com/en/latest/topics/yaml/index.html

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


No comments:

Post a Comment