Skip to main content

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


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.







Hands-on Labs


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:


Course Overview

About the Course


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


Lesson Description:

Get to know the training architect for this course!

Course Features and Tools


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


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.

Ansible Setup

How to Install Ansible


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


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


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


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.


Understanding Ansible Ad Hoc

The Ansible Command


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


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


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


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


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


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


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


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.


Configuring System Users and Groups

Creating System Users with the User Module


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


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


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


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.


Advanced Features

Managing Long-running Commands


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


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.

Course Wrap Up

Conclusion and Next Steps


Lesson Description:

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

Take this course and learn a new skill today.

Transform your learning with our all access plan.

Start 7-Day Free Trial