From the course: Red Hat Certified Engineer (EX294) Cert Prep: 2 Using Ansible Playbooks

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

YAML tips and tricks

YAML tips and tricks

- [Instructor] In computing, there are many different configuration data formats, including Key-value pairs, INI files, YAML formatted files, JSON files, and XML. This is just a short list. All of these types have pluses and minuses. Some are more human readable and others are more capable. Most configuration management systems allow you to choose the file format, and Ansible is no different. Most often, however, YAML is used for Ansible Playbooks. YAML is not specific to Ansible, so knowing it is a transferable skill set. YAML has minimal syntax, because it's not trying to be a programming language. It solely describes configuration. YAML supports a hierarchical structure so we can have nested items easily. However, not everyone loves YAML because of its Python-like reliance on syntactic whitespaces. This means it uses whitespaces to differentiate between hierarchy levels. The problem often lies in there being more…

Contents