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.
Playbook language
From the course: Red Hat Certified Engineer (EX294) Cert Prep: 2 Using Ansible Playbooks
Playbook language
- [Instructor] Playbooks are written in YAML. YAML has a minimum amount of syntax, and is not intended to be a programming language. YAML represents a model of a configuration or process. Let's talk now about the structure of a playbook. A playbook will include a list of one or more plays. A play is a sports analogy. Just as you can run a play in a football game that can do different things at different times, you can run Ansible plays at different times that do different things. Plays map hosts to well-defined roles using tasks. Tasks then execute modules on hosts. Playbooks can have multiple plays that all target different hosts or groups of hosts. This might still be a bit abstract, so let me give you an example. You could have a playbook that would include plays with tasks that target the web servers group. Modules would run on all hosts in this group, and then run other tasks on all hosts in the DNS servers group,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
Introduction to playbooks1m 33s
-
(Locked)
Playbook language2m 4s
-
(Locked)
YAML tips and tricks4m 6s
-
(Locked)
Install the Atom editor2m 37s
-
(Locked)
Configure VIM for YAML6m 20s
-
(Locked)
Playbook hosts and users5m 22s
-
(Locked)
Playbook tasks list2m 43s
-
(Locked)
Playbook change handlers3m 2s
-
(Locked)
Verify Playbooks2m 59s
-
-
-
-
-
-
-