Introduction to Ansible Transcripts
Chapter: Running Playbooks
Lecture: Writing Our First Playbook

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Time to match those Ansible concepts
0:01 with a specific example, and we're going to write
0:03 our first playbook together.
0:05 This playbook will contain several directories and files
0:08 and here's the structure we're going to create.
0:09 I'll have a project directory named first playbook.
0:11 We're going to have an inventory file named host
0:13 that'll contain the list of IP addresses.
0:15 In our case, only a single IP address for server
0:17 that we want to work with.
0:18 We'll have out top level playbook.yml file
0:21 that will tell Ansible what users should be executing
0:24 which tasks mapped to the servers.
0:26 It's specified in the host file.
0:27 We'll have a directory and a few subdirectories
0:29 roles/common/tasks that will contain YAML files
0:32 with the tasks that we want to run
0:34 against the server specified in the inventory file.
0:36 main.yml is the entry point for a role
0:38 so we'll include other files in main.yml
0:41 like ping.yml and other files that we'll create
0:44 along the way with tasks in them.
0:45 So, we'll build up main.yml
0:47 by including other YAML files as we go along.
0:50 That's the overall structure of the directories
0:52 and the files we're going to be creating in the next few videos
0:54 and the purpose of these should become apparent
0:56 as we start writing our files and then running them
0:58 against our server.