Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
YAML Fundamentals Complete Course
Role Play
Rating: 4.3 out of 5(202 ratings)
3,968 students

YAML Fundamentals Complete Course

Learn YAML step by step - mappings, lists, data types, multi-line strings and tags - and read real Ansible playbooks
Created byVitalii Shumylo
Last updated 10/2026
English
English [Auto],

What you'll learn

  • Learn the basics of YAML structure and the basic building blocks of its syntax
  • Use online parsers to check your files
  • Choose text editors and IDEs for YAML, and see why tabs cause problems
  • Create a nanorc file, a vimrc file and a VS Code setup for clean indentation
  • Work through YAML syntax in several examples
  • Use tags and data types, and write multi-line strings
  • Read an Ansible playbook example written in YAML

Course content

1 section • 15 lectures • 1h 51m total length
  • Course Overview. Basics of YAML Structure10:12

    Master YAML fundamentals by reading and writing consistent configurations, linting syntax, and building playbooks and scripts. Explore editor setups, block and flow styles, and indentation to manage multi-document YAML files.

  • Using Online Parsers5:07

    Learn to write and parse YAML using online parsers, explore key-value pairs, lists with dashes, and indentation rules to represent dictionaries, users, and departments, including error handling.

  • Choosing Text Editors and IDEs for YAML6:58

    Learn to choose and configure text editors for YAML, ensuring proper indentation with spaces, avoiding tabs, and enabling syntax highlighting and auto indents for reliable YAML and Ansible playbooks.

  • The Problem with Tabs3:59

    Explore how yaml relies on consistent indentation and careful tab-to-space handling, using command line tools and editors like VS Code to avoid hidden characters and key-value confusion.

  • Creating a .nanorc File8:03

    Install nano on linux, create the dot nano rc, set auto indent and two-space tabs for yaml, edit and validate files with nano and cat, and consider vim.

  • Creating a .vimrc File and VSCode8:04

    Explore configuring Vim with a .vimrc and dot vmmark file, enabling syntax highlighting and YAML-specific settings, then compare using Visual Studio Code for editing YAML files.

  • Quiz: YAML Structure, Tabs and Editor Setup
  • Basic Building Blocks of YAML Syntax10:27

    Explore the basic building blocks of YAML syntax, including block and flow styles for lists and mappings, scalars like strings, numbers, booleans, and nulls, and comments.

  • YAML Syntax. Part 27:12

    Explore YAML fundamentals by building sequences, mappings, and nested collections with scalars, and learn flow and block styles, indentation, and lists of mappings.

  • YAML Syntax. Part 25:51

    Explore yaml syntax, including document structures with start and end markers, anchors and aliases, and complex keys with sequences and mappings, plus compact nesting for streamlined data.

  • Using Tags3:43

    Explore how YAML tags explicitly declare data types, from untagged values to explicit string and timestamp tags, with examples of integers, floats, and hex data.

  • Quiz: Sequences, Mappings, Scalars and Tags
  • YAML Synatax Example7:26

    Explore YAML syntax through an end-to-end example including conference data, sessions, and attendee registration, using anchors, aliases, flow style sequences, and complex keys.

  • The Setting That Changed Itself: Untangling a Copy-Pasted YAML File
  • Understanding YAML Syntax. Example 211:39

    Explore YAML fundamentals for Ansible, including basic syntax rules, data types, lists and dictionaries, and practical lab examples using vim on a RHEL system.

  • Understanding YAML Syntax. Example 2. Part 211:02

    Explore YAML syntax by combining lists and dictionaries through a practical, complex example of employees with names, ages, and skills, and extend to Ansible inventories and playbooks.

  • An Ansible Playbook Example with YAML11:32

    Create an ansible playbook in yaml to install httpd, open port 80 via firewall commands, and start and enable the Apache service on boot, with a reload firewall handler.

  • Quiz: YAML in Ansible Inventories and Playbooks
  • One Tab Broke the Deployment: Reviewing a YAML File
  • Practice Test: YAML Fundamentals
  • Bonus Lecture: What to Learn Next0:18
  • Write, Check and Fix an Application Config File in YAML

Requirements

  • A computer with a text editor
  • No earlier YAML experience

Description

YAML is the file format behind Ansible playbooks, Kubernetes manifests, Docker Compose and many CI pipelines, and one wrong space can break all of them. This course teaches the syntax from the ground up, so you can write valid YAML and read the files other people give you.

What the lectures cover

Besides the main topics, you also work through: Test yourself with a practice test of 40 questions.

How the course works

Each lecture shows YAML being written on screen and explains why the structure works, with several examples of increasing difficulty. Setting up the editor comes early, so tab and space errors do not spoil your practice. A practice test at the end lets you check what you have learned.

Inside the course

The course is organised into these sections: Getting Started. Lectures you will find include: Using Online Parsers; Choosing Text Editors and IDEs for YAML; The Problem with Tabs; Basic Building Blocks of YAML Syntax; YAML Synatax Example; Understanding YAML Syntax. Example 2; An Example with Data Types; Using multi-line strings in YAML; An Ansible Playbook Example with YAML.

The course runs about 1.9 hours in 15 lectures. It is a focused course on YAML itself. It shows a single Ansible example but it does not teach Ansible or Kubernetes. It prepares you to learn those tools more easily.

Who this course is for:

  • System administrators who edit Ansible or Kubernetes files
  • DevOps engineers who want to stop guessing at syntax
  • Developers who meet YAML in CI files