Skip to main content

Mastering Ansible

4h 47m 58s
English
Free

Mastering Ansible is a step-by-step journey of learning Ansible for configuration management and orchestration. The course is designed as a journey through configuring a realistic application stack from the ground up. Instead of going page-by-page through the Ansible documentation, topics are ordered to align with the growing complexity of our application as we build it up and refactor it.

In addition to the core concepts of configuration with Ansible, we spend time on building tools to help us maintain and troubleshoot our application. The goal is to have a workflow where all of the configuration and troubleshooting is done through ansible playbooks that can be committed to a repository and improved over time.

The course is divided into 6 sections, starting with initial installation and foundational concepts. Starting in section 3, we build up a sample application environment layer-by-layer, learning a new concept in each lecture. After the application is up and running, we refactor our setup in section 4 with an emphasis on modularity and encapsulation. In section 5, we optimize our code and learn about techniques to reduce the playbook execution time. The course finishes with a final section on troubleshooting and testing.

For each lecture, we introduce a new Ansible concept and apply it to our playbooks. For most lectures, we execute the new concept in the demo environment so you can see what the output should look like. In the notes of each lecture, you'll find a link to the relevant documentation pages, along with a snapshot of the codebase at the end of that lecture.

This course was built with Ansible version 1.9.3, applied to a 3-tiered web application environment leveraging NGINX, Apache2, Python, and MySQL on Ubuntu Linux servers. We do not cover administering Windows servers in this course.

This course is designed as an introduction to Ansible, but also as a guide for engineers interested in configuration management, orchestration, infrastructure-as-code, and devops principles.

Requirements:
  • You should have a Linux or Mac OS X computer, or access to at lease one Linux virtual machine for installing Ansible.
  • You'll need a code editor or IDE of your choice.
  • You'll need a terminal and ssh client for running Ansible against target hosts.
  • You should have access to 5 Linux servers (bare-metal or virtual machine) if you want to setup the course environment and follow along step-by-step.
Who this course is for:
  • The course is designed for students who have little or no experience with Ansible, but are familiar with Linux systems administration concepts.
  • No programming or previous automation experience is required.
  • If you've never logged into a Linux shell and run commands before, you will learn the Ansible syntax but you may not understand the 'why' behind the tasks that we configure. We try to explain all syst

What you'll learn:

  • Execute ad-hoc commands against servers using Ansible
  • Write Ansible configuration playbooks to deploy a 3-tier web application
  • Configure Ansible roles with tasks, handlers, files, templates, and default variables
  • Write operational playbooks to check cluster status and perform a cluster restart.
  • Optimize Ansible playbooks to reduce playbook execution time.
  • Test and troubleshoot Ansible playbook execution.

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 54 lessons

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 Preview05:34
11Playbooks Introduction04: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: pip03: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 & Galaxy04:42
40Advanced Execution Introduction 02:59
41Removing Unnecessary Steps: gather_facts 03:30
42Extracting Repetitive Tasks: cache_valid_time04: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 YAML06:12
54A Brief Overview of Jinja205:59