Ansible for sysadmins: automate Linux server setup

Turn manual server setup into idempotent playbooks and roles: users, packages, configuration, services, secrets and tests you can trust

6 ratings 1,650 students Sample

Created by Hana Novak

  • Updated September 2026
  • English
  • Intermediate

What you will learn

  • Build inventories and run ad hoc commands against groups of servers
  • Write idempotent playbooks with modules, handlers and templates
  • Organise automation into reusable roles and collections
  • Manage variables and secrets with clear precedence and Ansible Vault
  • Test roles with check mode, ansible-lint and Molecule
  • Run safe rolling changes across a fleet

Course content

6 sections, 24 lessons, 3h 50m total

Getting started with Ansible 5 lessons · 46 min
  • Video: How Ansible works Preview 8 min
  • Article: Inventory and ad hoc commands Preview 10 min
  • Article: Your first playbook 12 min
  • Article: Templates, handlers and idempotent changes 11 min
  • Quiz: Check your understanding 5 min
Variables and facts 4 lessons · 40 min
  • Video: Where variables come from 11 min
  • Video: Facts and handling OS differences 10 min
  • Article: Conditionals, loops and registered results 10 min
  • Video: Jinja2 filters you will actually use 9 min
Roles and collections 4 lessons · 42 min
  • Video: Turning playbooks into roles 11 min
  • Article: Designing reusable roles 10 min
  • Video: Collections and requirements files 9 min
  • Video: A web server role with nginx and TLS 12 min
Secrets and security 3 lessons · 29 min
  • Article: Ansible Vault for secrets 10 min
  • Video: Hardening servers with a baseline role 11 min
  • Video: Protecting the control node and keys 8 min
Testing and quality 3 lessons · 29 min
  • Article: ansible-lint and YAML hygiene 8 min
  • Video: Testing roles with Molecule 12 min
  • Video: Running Ansible in CI 9 min
Operating a fleet 5 lessons · 44 min
  • Article: Rolling updates with serial and max_fail_percentage 11 min
  • Video: Dynamic inventories for cloud servers 10 min
  • Video: Debugging failing playbooks 9 min
  • Article: Ansible alongside Terraform and containers 8 min
  • Quiz: Final check 6 min

Requirements

  • Comfortable with the Linux command line and SSH
  • Basic YAML reading skills
  • A computer that can run two or three small virtual machines

Description

If you have ever set up a server by following a wiki page of commands, you know the problems: steps get skipped, servers drift apart and nobody remembers why a setting is there. Ansible replaces that wiki page with code that runs the same way every time, over plain SSH, with no agent to install on the servers.

What you will build

We automate the setup of a small fleet of Ubuntu and Rocky Linux servers:

  • Admin users with SSH keys and sudo rules
  • A hardened SSH configuration and a host firewall
  • Packages, time sync and automatic security updates
  • An nginx web server with templated site configuration
  • A PostgreSQL database with backups
  • Secrets stored encrypted with Ansible Vault

How the course works

Section one is fully written and gets you from installation to a working playbook. Later sections build the fleet in small, testable steps. Every task is written to be idempotent: running a playbook twice changes nothing the second time, and we check this explicitly.

We use ansible-core with the community collections you need, fully qualified module names and ansible-lint from the start, so your playbooks follow current conventions. The lab uses local virtual machines created with Multipass or Vagrant, and everything also works against cloud servers.

Who this course is for

  • System administrators who manage servers by hand today
  • Developers responsible for their own Linux servers
  • DevOps engineers who need configuration management alongside cloud provisioning

Instructor

Hana Novak

Linux automation engineer teaching Bash scripting and Ansible for people who manage real servers

  • 4.4 instructor rating
  • 13 reviews
  • 3,840 students
  • 2 courses
  • Sample

I look after fleets of Linux servers and I automate anything I have to do twice. Bash covers the small jobs and Ansible covers everything that needs to be repeatable across many machines.

My courses are practical and a little strict. You will learn to write scripts that fail safely, quote variables properly and log what they did, and playbooks that can run a second time without breaking anything.

I build every lab on virtual machines you can create for free, and I explain each command line flag the first time it appears. If you have ever copied a script from the internet and hoped it worked, my courses are for you.

View profile

Student reviews

4.3 6 ratings
5 star 50%
4 star 33%
3 star 17%
2 star 0%
1 star 0%
Fatou S. Sep 26, 2026
Sample

Ubuntu and Rocky in one playbook

Handling OS differences with facts and variable files was very well explained.

Mateusz G. Sep 12, 2026
Sample

Idempotency drilled in properly

Running every playbook twice and expecting zero changes is now my habit. It caught several sloppy shell tasks.

Ayesha R. Aug 20, 2026
Sample

The SSH lockout advice saved me

Validate plus testing on one host with a second session open prevented a very bad afternoon.

Daniel O. Jul 9, 2026
Sample

Clear role structure lessons

Turning a long playbook into small roles made our automation much easier to share. Molecule took some setup.

Rosa P. May 16, 2026
Sample

Great for working sysadmins

Practical, not theoretical. The rolling update lesson matched exactly what we needed for our web servers.

Kai T. Mar 22, 2026
Sample

Good but VM setup was slow

Content is good. Getting the lab virtual machines running on my laptop took a while.

$39.99 Enroll now
SampleSample catalog: the instructors, courses, reviews and stats on this site are demo content.