Skip to main content
CF

Mastering Ansible

4h 47m 58s
English
Free

Mastering Ansible is a comprehensive guide designed for those keen to delve into configuration management and orchestration using Ansible. This course takes you on a step-by-step journey, building a realistic application stack from scratch, aligning with Ansible's core concepts, and integrating more complexity as the application evolves.

Course Overview

Instead of merely browsing through Ansible documentation, this course strategically orders topics to match the rising complexity of your application as you build and refactor it. The focus remains on crafting tools that help maintain and troubleshoot applications, aiming for a workflow where all configuration and troubleshooting is conducted via Ansible playbooks, allowing for repository commitment and future improvements.

Course Structure

The course unfolds across 6 sections:

  1. Initial installation and foundational concepts.
  2. Building a sample application environment layer-by-layer, learning a new concept in each lecture.
  3. Refactoring the setup with an emphasis on modularity and encapsulation.
  4. Optimizing code and reducing playbook execution time.
  5. Troubleshooting and testing final configurations.

Each lecture introduces a new Ansible concept, applied directly to your playbooks, featuring live demonstrations showing expected outputs. Lecture notes include links to relevant documentation and snapshots of the codebase by the lecture's end.

This course uses Ansible version 1.9.3 with a focus on a 3-tier web application environment, leveraging NGINX, Apache2, Python, and MySQL on Ubuntu Linux servers. Note that Windows server administration is not covered.

Perfect for beginners, the course also serves as an excellent resource for engineers interested in configuration management, orchestration, infrastructure-as-code, and DevOps principles.

Course Requirements

  • You should have a Linux or Mac OS X computer, or access to at least one Linux virtual machine for installing Ansible.
  • A code editor or IDE of your choice is needed.
  • A terminal and SSH client are necessary for running Ansible against target hosts.
  • Access to 5 Linux servers (bare-metal or virtual machines) is recommended to set up the course environment and follow along.

Target Audience

  • The course is geared towards students with minimal or no Ansible experience but a basic understanding of Linux systems administration.
  • No programming or prior automation experience is required.
  • If you're new to the Linux shell, you'll learn Ansible syntax, though understanding the underlying principles might be challenging. However, comprehensive explanations are provided for all system configurations.

What You'll Learn

  • Executing ad-hoc commands against servers using Ansible.
  • Writing Ansible configuration playbooks for deploying a 3-tier web application.
  • Configuring Ansible roles with tasks, handlers, files, templates, and default variables.
  • Creating operational playbooks to check cluster status and perform cluster restarts.
  • Optimizing Ansible playbooks to enhance execution efficiency.
  • Testing and troubleshooting Ansible playbook executions.

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 54 lessons

  • Space or K: play or pause
  • J: rewind 10 seconds
  • L: forward 10 seconds
  • Left Arrow: rewind 5 seconds
  • Right Arrow: forward 5 seconds
  • Up Arrow: volume up
  • Down Arrow: volume down
  • M: mute or unmute
  • F: toggle fullscreen
  • T: toggle theater mode
  • I: toggle mini player
  • 0 to 9: seek to 0 to 90 percent of the video
  • Shift plus N: next video
  • Shift plus P: previous video
0:00 0:00
#Lesson TitleDuration
1Introduction 02:49
2Configuration Management & Orchestration 05:54
3Environment Setup 05:10
4Installation 03:05
5Inventory Pt 1 03:45
6Inventory Pt 2 04:54
7Host Selection 03:46
8Tasks 05:07
9Plays 04:36
10Playbook Execution Preview 05:34
11Playbooks Introduction 04:43
12Packages: apt 04:34
13Packages: become 04:08
14Packages: with_items 05:09
15Services: service 06:50
16Support Playbook 1 - Stack Restart 03:09
17Services: apache2_module, handlers, notify 05:40
18Files: copy 05:55
19Application Modules: pip 03:12
20Files: file 05:28
21Files: template 06:32
22Files: lineinfile 06:50
23Application Modules: mysql_db, mysql_user 04:58
24Support Playbook 2 - Stack Status: wait_for 09:26
25Support Playbook 2 - Stack Status: uri, register, fail, when 11:11
26Playbooks Summary 03:14
27Roles Overview 04:42
28Converting to Roles: tasks, handlers 05:03
29Converting to Roles: files, templates 05:51
30Site.yml: include 03:00
31Variables: facts 06:10
32Variables: defaults 05:21
33Variables: vars 08:21
34Variables: with_dict 07:13
35Selective Removal: shell, register, with_items, when 05:46
36Variables - continued 06:26
37Variables: vars_files, group_vars 06:35
38Variables: vault 10:50
39External Roles & Galaxy 04:42
40Advanced Execution Introduction 02:59
41Removing Unnecessary Steps: gather_facts 03:30
42Extracting Repetitive Tasks: cache_valid_time 04:11
43Limiting Execution by Hosts: limit 02:41
44Limiting Execution by Tasks: tags 06:38
45Idempotence: changed_when, failed_when 06:24
46Accelerated Mode and Pipelining 04:44
47Troubleshooting Ordering Problems 05:48
48Jumping to Specific Tasks: list-tasks, step, start-at-task 04:01
49Retrying Failed Hosts 02:44
50Syntax-Check & Dry-Run: syntax-check, check 05:21
51Debugging: debug 04:19
52Authentication with SSH Keys 06:48
53A Brief Overview of YAML 06:12
54A Brief Overview of Jinja2 05:59

Related courses

Frequently asked questions

What are the prerequisites for enrolling in the course?
Before enrolling in this course, it is beneficial to have a basic understanding of Linux command line operations and familiarity with YAML syntax. The course does not cover these prerequisites in detail, but they are essential for understanding how to work with Ansible effectively.
What kind of project will I build during the course?
During the course, you will build a realistic 3-tier web application stack. This involves constructing and managing an environment layer-by-layer using Ansible playbooks, covering tasks such as configuration management, orchestration, and troubleshooting.
Who is the target audience for this course?
This course is designed for system administrators, DevOps engineers, and IT professionals who are interested in learning configuration management and orchestration using Ansible. It is also suitable for those who wish to automate tasks and improve their workflow efficiency.
How does this course differ from other Ansible courses?
Unlike many courses that simply walk through Ansible documentation, this course is structured to build complexity alongside the development of an application stack. It emphasizes modularity, encapsulation, and real-world troubleshooting, providing practical, hands-on experience.
What specific tools or platforms are covered in the course?
The course focuses on Ansible version 1.9.3 and covers tools such as apt for package management, pip for application modules, and mysql_db and mysql_user for database management. It also includes configurations for services like apache2_module and integrates concepts like handlers and notify.
What topics are not covered in the course?
The course does not cover topics outside the scope of Ansible's core concepts and application stack building. It assumes prior knowledge of basic Linux commands and does not delve into alternative configuration management tools or advanced Ansible versions beyond 1.9.3.
What is the expected time commitment for this course?
The course comprises 54 lessons, each building upon the previous one. While the total runtime is not specified, students can expect to dedicate several hours per week to watch lectures, complete exercises, and apply concepts to their own playbooks, depending on their existing familiarity with Ansible.