Book Image

Troubleshooting Puppet

By : Thomas Uphill
Book Image

Troubleshooting Puppet

By: Thomas Uphill

Overview of this book

Table of Contents (14 chapters)

YAML files


In the great tradition of recursive acronyms, YAML expands to YAML Ain't Markup Language. YAML is a markup language that strives to be as human-readable as possible. The format is relatively simple. To signal the beginning of a YAML document within a file, use three dash characters (---). The end of the document is usually just interpreted as the end of the file in concern. However, you can specify the end of the document with three periods (...). Tokens are separated by colons (:). Most of the YAML code that you will encounter while working with Hiera will consist of key:value pairs.

Arrays are multiline elements, with each element of an array having its own line and a specific indentation. Indentation is important in YAML files in much the same way as it is in Python code. However, you can use square brackets ([]) or braces ({}) to represent an array on a single line.

Keys may only contain letters, numbers, and the underscore character. Keys must start with a letter.

Hiera is configured...