Ansible: Setup, Configure, and Ad Hoc Commands Deep Dive
Course Development Director in Content
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
About the Course
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
Get to know the training architect for this course!
Course Features and Tools
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!
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
How to Install Ansible
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
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.
The Ansible Configuration File
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
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.
Ansible Ad Hoc Commands
Understanding Ansible Ad Hoc
The Ansible Command
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
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
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
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
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
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
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
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.
Configuring System Users and Groups
Creating System Users with the User Module
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
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
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
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.
Managing Long-running Commands
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
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
A short wrap-up of the course and some discussion on what to do now that you are done.