Ansible: Setup, Configure, and Ad Hoc Commands Deep Dive

Course

Intro Video

Photo of Stosh Oldham

Stosh Oldham

Course Development Director in Content

I have been working with technology in some way or another ever since my high school days. After attaining my bachelor’s degree in computer science, I spent over a decade in IT working on anything from fixing printers to engineering enterprise IT systems. I now have the privilege of sharing my expertise as a Linux Training Architect for Linux Academy. When I am not sitting behind a terminal, I like going on holiday and spending time with my family.

Length

05:08:24

Difficulty

Intermediate

Course Details

Modern DevOps culture requires both automation and configuration management. Ansible is capable of meeting both of these end goals. This course is the first in a series of courses designed to provide a thorough introduction to key Ansible features and modules that lay a foundation for building upon. We start with installing and configuring Ansible itself. Afterwards, the most common tasks in systems management are approached using key Ansible modules. After completing this course, students will have a firm understanding of many core Ansible modules and key Ansible features such as asynchronous task management. The next course in the series, "Ansible: Playbooks Deep Dive", covers creating Ansible playbooks in depth.

Interactive Diagram: https://interactive.linuxacademy.com/diagrams/Ansible.html

Syllabus

Introduction

Course Overview

About the Course

00:01:52

Lesson Description:

This video provides a brief introduction to the topics covered in this course and also discusses what prerequisite knowledge is necessary for success in this course.

About the Training Architect

00:00:35

Lesson Description:

Get to know the training architect for this course!

Course Features and Tools

00:02:48

Lesson Description:

This video makes a note of what features and tools this course provides. These tools may be leveraged for maximum student benefit. For more detail on the various features, be sure to check out the Introduction section of this Linux Academy course!

About Ansible

00:03:53

Lesson Description:

In this lesson, we discuss the basic functions of Ansible. There is also some discussion on how Ansible operates at a high level. This sets the foundation for the course.

Setup and Configuration

Ansible Setup

How to Install Ansible

00:09:08

Lesson Description:

This lesson demonstrates how to install and perform the basic configuration required to use Ansible on a Linux server. After the basic setup is complete, we demonstrate some basic Ansible functionality.

Configuring SSH and Sudo for Ansible

00:11:29

Lesson Description:

One of the most important parts of Ansible configuration is ensuring that Ansible can operate on other hosts. This is accomplished by properly configuring systems users with SSH and Sudo access. This lesson covers how you can configure an Ansible control node to work with managed nodes over SSH with sudo privilege.

Ansible Configuration

The Ansible Configuration File

00:07:54

Lesson Description:

We take a look at where Ansible looks for configuration values as well as how we might go about changing those values. We discuss both the default configuration file and the ansible-config command along with various configuration parameters.

Setting Up the Ansible Inventory

00:10:38

Lesson Description:

In this lesson, we take a look at how we can configure an Ansible inventory. We discuss the default inventory location as well as how to provide a non-default inventory file. Students will understand how to create host groups and general inventory file syntax upon completion of this lesson.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

00:30:00

Ansible Ad Hoc Commands

Understanding Ansible Ad Hoc

The Ansible Command

00:08:48

Lesson Description:

This lesson breaks down the essential syntax of the ansible command. Each option is discussed and demonstrated. We also preview the ping and yum modules throughout the demonstration.

Understanding Ansible Modules

00:06:48

Lesson Description:

This lesson breaks down what an Ansible module is from the system administrator's point of view. We provide a discussion on how to find out information on specific modules along with a demonstration of how to use the documentation. After viewing this lesson, students will be equipped to delve deeper into topics at their pleasure.

The Shell and Command Modules

00:10:26

Lesson Description:

We discuss the command and shell module at length in this lesson. Students who watch this video will be able to run raw commands against target Linux systems with Ansible using the noted modules. An effort is made to distinguish the differences between command and shell.

Collecting System Information

00:06:04

Lesson Description:

We discuss Ansible Facts in this lesson. Students will learn how to collect system information through the use of Ansible. There is a discussion on how facts may be filtered and stored in JSON format.

File Manipulation with Ansible

Working with the File and Copy Modules

00:14:07

Lesson Description:

This video begins a brief series on working with files using Ansible. We demonstrate the file and copy modules in this particular lesson and discuss key arguments at length.

Editing File Contents with the `lineinfile` Module

00:10:13

Lesson Description:

The lineinfile module is a great way for adding content to a file in a specific place. This lesson demonstrates how to use the module as an ad-hoc command. We also spend time covering key arguments that may be used with the module.

Downloading Files with the `get_url` Module

00:08:13

Lesson Description:

Downloading files from remote hosts is an essential task in systems administration. The get_url module is how you can do this with Ansible! This lesson covers the get_url Ansible module along with key options the module supports.

Working with File Archives

00:08:38

Lesson Description:

This lesson covers how to use the archive and unarchive modules in Ansible. We review other file manipulation modules as the demonstration is set up. Students who complete this lesson will have a foundational understanding of working with files through Ansible.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Configuring System Users and Groups

Creating System Users with the User Module

00:06:35

Lesson Description:

Creating and manipulating users is a fundamental administration task. This may be done using the Ansible user module. We discuss and demonstrate the features of the user module in this lesson.

Working with the Group Module

00:07:10

Lesson Description:

Maintaining system groups is equally important to system users. We review the Ansible group module in this lesson. During the lesson, we demonstrate the group module and review the user module.

Installing Software and Daemon Managment

Installing Software

00:06:36

Lesson Description:

The ability to install software is essential for daily systems administration. This video demonstrates several key modules that Ansible offers for installing software while discussing how the modules differ in use case.

Controlling Daemons with the Service Module

00:04:35

Lesson Description:

The Ansible service module may be used to control system daemons using either the BSD init system or the newer systemd approach. This lesson discusses how you can engage the service module to remotely control daemons with Ansible in your environment.

Hands-on Labs are real live environments that put you in a real scenario to practice what you have learned without any other extra charge or account to manage.

01:00:00

Advanced Features

Managing Long-running Commands

00:05:34

Lesson Description:

This lesson covers using the asynchronous features of Ansible. Timeouts and job polling are reviewed. After viewing this video, we will understand how to manage commands that may take a long time to run with Ansible.

Parallelism in Ansible

00:04:35

Lesson Description:

A brief lecture on how Ansible handles running tasks in parallel is provided. There is discussion on how to control the number of forks Ansible may run and the impacts of running Ansible with a high number of forks.

Conclusion

Course Wrap Up

Conclusion and Next Steps

00:01:33

Lesson Description:

A short wrap-up of the course and some discussion on what to do now that you are done.