Posts

Showing posts with the label YAML

YAML

YAML  Ain't Markup Language ( YAML ) is a serialization language that has steadily increased in popularity over the last few years. This blog provides a basic overview of correct YAML syntax, which is how Ansible playbooks are expressed. We use YAML because it is easier for humans to read and write than other common data formats like JSON or XML.  also, there are libraries available in most programming languages for working with YAML. YAML Basics  For Ansible, nearly every YAML file starts with a list. Each item in the list is a list of key/value pairs, commonly called a “hash” or a “dictionary”. So, we need to know how to write lists and dictionaries in YAML. There’s another small quirk to YAML. All YAML files (regardless of their association with Ansible or not) can optionally begin with  ---  and end with  ... . This is part of the YAML format and indicates the start and end of a document. All members of a list are lines beginning at the same indentation lev...