Automate Your Servers with Ansible and Python Course

Course Summary

A course by Matt Makai of Full Stack Python for software developers who want to learn the Ansible configuration management tool for managing servers, deploying web applications and performing DevOps tasks.

What students are saying

If you’re at all interested in Python, or new to programming, take any (or all!) of Talk Python’s courses. A friendly, approachable, and incredibly practical set of courses.
-- James G.

Source code and course GitHub repository

github.com/fullstackpython/book-and-video-code-examples

What's this course about and how is it different?

Most books and courses only walk you through the narrow happy path through the difficult programming forest. When you step off the path you can feel lost and frustrated because the instructor is no longer there to keep you on track.

This course takes a different approach where I show you the mistakes and errors that you will commonly run into when using Ansible, such as:

  • Handling Python 3 instead of 2 as a default remote server installation
  • Identifying and fixing typos in command line arguments and file paths
  • Tweaking configurations for services that need to start in certain orders
  • Upgrading privileges when permissions are denied in running tasks
  • Working with Ansible modules that have specific Python dependencies such as psycopg2 for PostgreSQL
  • Fixing shell script commands running within Ansible tasks

The best way to learn a new software development library is to pair program with a more experienced developer. That's why most of this course is live coding with explanations of what we are doing and why along the way. View the full course outline for more details.

Learn Ansible by configuring servers and deploying applications

Ansible is a stable, widely-used open source configuration management tool that works amazingly well for application deployments in any programming language, not just Python web apps.

During this course we will build several Ansible playbooks together so we can learn the tool's core concepts including:

  • Modules
  • Tasks
  • Roles
  • Templates
  • YAML syntax
  • Variables
  • Encryption

We'll build playbooks that demonstrate these concepts and connect them together by configuring servers and handling deployments.

Who is this course for?

The ideal student for this course is someone with the ability to create web applications (even simple ones) who wants to learn Ansible and configuration management to automate working with servers and application deployments.

If you don't know any programming at all, you'll want to take a primer first. I recommend you take the free MIT course Introduction to Computer Science and Programming Using Python.

If you don't know Python, consider taking Michael's Python Jumpstart by Building 10 Apps course. You do not need to know Python to learn Ansible but a bit of knowledge will help understand some of the edge case issues we debug in this course.

Concepts backed by concise visuals

An abstract topic like configuration management is best learned with diagrams and visuals to explain how the pieces fit together. Here's an example from chapter 3 when we introduce Ansible's core concepts and show how they relate:

Example: Concepts backed by concise visuals

Another example is how our two-server application deployment works as we build our Ansible playbook to automate each step:

Example: Concepts backed by concise visuals

Follow along with subtitles and transcripts

Each course comes with subtitles and full transcripts. The transcripts are available as a separate searchable page for each lecture. They also are available in course-wide search results to help you find just the right lecture.

Each course has subtitles available in the video player.

Get hands-on for almost every chapter

Learning IDEs can be hard. There are just so many features. Unless you build that muscle memory with practice, most of them will be forgotten. Mastering PyCharm has hands-on exercises for almost every chapter of the course.

These exercises range in length from 10 minutes to about 30 minutes each.

Here is the your turn for the Refactoring chapter

Hands on exercises

Who am I? Why should you take my course?

Who is Matt Makai?

Hey there, my name is Matt Makai, thanks for considering my course! I'm stoked to teach this course for several reasons:

  1. I've been a professional software developer for over 15 years which has shown me how rewarding and empowering it is to create software for your own purposes.

  2. In 2012 I started Full Stack Python as a side project to help junior developers on my team learn how to build web applications with the Python programming language. This course is a natural extension of what is provided on Full Stack Python, with step-by-step instructions so anyone can build their own application even without prior programming experience.

  3. As part of the Twilio Developer Network, it's my goal to inspire and equip fellow software developers. Even if you don't consider yourself a developer, it's absolutely possible to build what you want if you're willing to take some of your own inspiration and put it into learning from hands-on videos that equip you to code.

Free office hours keep you from getting stuck

One of the challenges of self-paced online learning is getting stuck. It can be hard to get the help you need to get unstuck.

That's why at Talk Python Training, we offer live, online office hours. You drop in and join a group of fellow students to chat about your course progress and see solutions via screen sharing.

Just visit your account page to see the upcoming office hour schedule.

Is this course based on Python 3 or Python 2?

This course is based upon Python 3. Python 2 is officially unsupported as of January 1st, 2020 and we believe that it would be ill-advised to teach or learn Python 2. This course is, and has always been, built around Python 3.

This course is delivered in very high resolution

Example of 1440p high res video

This course is delivered in 1440p (4x the pixels as 720p). When you're watching the videos for this course, it will feel like you're sitting next to the instructor looking at their screen.

Every little detail, menu item, and icon is clear and crisp. Watch the introductory video at the top of this page to see an example.

The time to act is now

Learn Ansible to leverage the power of repeatable, declarative server configuration.

Course Outline: Chapters and Lectures

Introduction
14:02
Welcome to the Course
1:44
Why Ansible?
4:21
Obtaining the Source Code
0:32
Meet Your Instructor
3:22
Working with Ansible
3:25
Thank you to our sponsor, DigitalOcean
0:38
Development Environment Configuration
11:14
Configuring Ansible on macOS
2:53
SSH Keys on macOS
1:55
Options for Using Ansible on Windows
1:29
Configuring Ansible on Ubuntu
3:12
SSH Keys on Ubuntu
1:45
Ansible Core Concepts
21:34
Core Ansible Concepts Overview
4:44
Modules
4:16
Tasks
2:09
Running Ad Hoc Tasks
2:34
Roles
2:18
Playbooks
1:18
Inventory
1:37
YAML
1:56
Applying the Ansible Concepts
0:42
Running Playbooks
18:26
Writing Our First Playbook
1:01
YAML in the Playbook File
1:49
Sign up for DigitalOcean
1:08
Provision A Server
1:33
Create A New SSH Key
2:24
Creating Our First Role
4:11
Adjusting Output Verbosity
1:51
New Users with the group, user and authorized_key Modules
3:34
Reviewing Our First Playbook
0:55
Data
17:19
Working with Data
1:37
Ansible Variables
3:13
Environment Variables
2:28
What are Templates?
1:14
Working with Templates
3:39
Encrypting Data
1:09
Ansible Vault
3:02
Using Data
0:57
Configuring Servers
37:30
Configuring Servers
1:32
New Playbook Scaffolding
1:07
Provisioning Two Servers
1:10
Our New Inventory File
1:05
Initial Configuration Playbook
6:16
Creating a Non-root User
2:42
Installing System Packages with the apt Module
1:39
Testing Our Playbook
1:11
Setting up Firewalls with the ufw Module
2:20
Splitting Web Server and Database Server Roles
4:24
Running Nginx
1:41
The template Module for Configuration Files
2:32
Installing PostgreSQL
3:35
PostgreSQL Management with the postgresql_db and postgresql_user Modules
4:43
Testing the Database Connection
0:59
Reviewing Ansible Modules for Server Configuration
0:34
Deployments
48:38
Learning Ansible Modules by Deploying
3:08
DNS Configuration
1:44
Enhancing Our Playbook and Let's Encrypt
2:46
SSL Certificates with the shell and stat Modules
5:41
Enhancing the Nginx Template
5:40
Testing the Nginx Tasks
3:01
Deploy Keys on GitHub
5:54
Cloning Repositories with the git Module
1:42
Installing App Dependencies with venv and pip3
3:17
Using the start-at-task Argument
2:07
Configuring Supervisor with the service and pause Modules
3:51
Solving Template File Name Issues
1:27
Fixing Our Nginx Configuration
3:01
Serving Static Assets
1:02
Updating Config Files with the lineinfile Module
3:06
Learning Ansible with A Deployment Recap
1:11
What's Next
5:12
Course Recap
2:29
What to Investigate Next
2:43
Buy for $59 + tax Bundle and save 85% Team Gift

Questions? Send us an email: contact@talkpython.fm

Talk Python's Mastodon Michael Kennedy's Mastodon