Getting Started with Ansible
Ensuring systems are configured properly is time consuming, error-prone, and tedious. This course will teach you how to use Ansible to configure any level of infrastructure.
What you'll learn
Manually configuring systems is a hassle that doesn't scale. In this course, Getting Started with Ansible, you’ll learn to automate system configuration. First, you’ll explore using modules and playbooks to enforce a desired state. Next, you’ll discover an ecosystem of reusable content bundled into collections. Finally, you’ll learn how inventory allows managing a variety of hosts. When you’re finished with this course, you’ll have the skills and knowledge of Ansible needed to configure any level of infrastructure from networks to servers to applications.
Table of contents
- First Install a Compatible Python Version 2m
- pip install ansible 3m
- Optional: Installing Ansible into a Second Python Environment 5m
- The ansible.builtin.ping Module 1m
- Creating a File with the File Module 2m
- Ensuring a Directory Exists with the File Module 2m
- Ensuring the Directory Is Absent 1m
- Module Synopsis via ansible-doc 2m
- Finding the Copy Module in the Online Docs 3m
- Check Mode 3m
- Diff Mode 2m
- Changing and Diffing the Timezone with Ansible 2m
- What Is Inventory? 2m
- Using the All Group with Multiple Nodes 1m
- The Command Module and Implicit localhost 2m
- Setting up an Inventory File via ansible.cfg 2m
- Validating Config with ansible-config dump 2m
- Config Docs via ansible-config list 2m
- Validate Inventory with ansible-inventory --list --yaml 1m
- Make Sure You Can Connect to Remote Nodes via SSH 2m
- How Modules Work over SSH 2m
- Why the Timezone Module Requires Privilege Escalation 3m
- Using the --become Flag to Elevate Privileges 2m
- Implicit localhost Does Not Use SSH 2m
- Provide Sudo Password with --ask-become-pass 1m
- Grand Finale: Ensure a Consistent Timezone across All Nodes 2m
- Bonus: Using the pip Module to Setup Bash Tab Completion 3m
- Porting an ad-hoc Copy Module Call to a Playbook 2m
- ansible-playbook Verbosity and NOCOWS 3m
- Multiple Tasks = Multiple Modules 2m
- Module Arg Style: Shorthand vs. YAML 2m
- Installing the redhat.ansible VS Code Extension 3m
- ansible-lint VS Code Integration 2m
- Using --tags to Run a Subset of a Playbook 3m
- Enabling --diff and --check Mode in the Playbook 2m
- Troubleshooting Remote Privilege Escalation and apt-get update 3m
- Gathering Facts with the Implicit Setup Task 2m
- Configuring macOS Accent Color via osx_defaults Module 2m
- Using the Debug Module to Display Facts 2m
- Conditional Tasks with the --when Keyword 3m
- gather_facts: Disable Unused Facts to Speed up Playbooks 2m
- gather_subset: of Facts 2m
- ansible-doc -t keyword 2m
- Override the Default NGINX Page 2m
- ansible-galaxy collection list 2m
- Using the ansible-core Package Alone 2m
- ansible-galaxy collection install community.general 2m
- Timeline of Reorganizing the Ansible Package into Collections 4m
- Collection Dependencies and Removing Collections 2m
- Using Ansible to Install Ansible 3m
- Understanding Collection Versions 2m
- Installing a Specific Version of a Bundled Collection 2m
- Updating a Manually Installed Collection 1m
- Dissecting a Collection: ansible-galaxy collection download 3m
- Fully Qualified Name Components 3m
- Finding Collection Details via galaxy.ansible.com 4m
- Searching across Collections for Content (i.e. Modules) 2m
- Overview: From Static to Dynamic Inventory 2m
- Creating a Background Container with the Docker CLI 4m
- Defining a Container with the docker_container Module 2m
- docker_container Module Prerequisites 1m
- Adding Another Container to the Playbook 1m
- Looping to Create Multiple Containers 2m
- Loop with a range() 1m
- Static Inventory for a Container with ansible_connection 3m
- Validating Ansible Actually Runs a Module Inside Your Container 3m
- Adding Another Container to the Static Inventory 1m
- The docker_containers Inventory Plugin 4m
- Cranking up the Containers Just Works 2m
- Simulating Drift 2m
- A Playbook to Simulate a Web App Deploy 2m
- Suppressing the Python Interpreter Discovery Warning 2m
- Controlling Task Parallelism with --forks 3m
- Using the Serial Keyword to Batch Nodes 3m
- Configure Ansible to Show When Tasks Begin 2m
- Terse Output with the Dense Callback Plugin 1m
- Dynamic Files with the Template Module 4m
- Cleanup Containers with state:absent and force_kill 2m
- module_defaults: Reduce Repetitive Module Args 2m