Unlock the power of automation with Ansible and Ansible Playbooks in this comprehensive course designed to elevate your IT infrastructure management skills. Through step-by-step guidance, you will master Ansible's agentless architecture, efficient task execution, and powerful automation capabilities to streamline your workflows.

Ansible and Ansible-Playbooks for Automation
Grow your skills with Coursera Plus for $239/year (usually $399). Save now.

Recommended experience
Recommended experience
Intermediate level
IT professionals with basic Linux command-line knowledge will benefit. Beginners to automation are welcome.
Recommended experience
Recommended experience
Intermediate level
IT professionals with basic Linux command-line knowledge will benefit. Beginners to automation are welcome.
What you'll learn
Implement agentless automation for infrastructure management with Ansible.
Create and execute dynamic Ansible playbooks for complex workflows.
Integrate secure practices using Ansible Vault and SSH keys.
Leverage loops, templates, and roles to enhance task efficiency and reusability.
Skills you'll gain
Tools you'll learn
Details to know

Add to your LinkedIn profile
36 assignments
See how employees at top companies are mastering in-demand skills

There are 36 modules in this course
In this module, we will explore the foundational concepts of Ansible. You will gain insights into its capabilities, understand the differences between its core and community editions, and learn how its architecture facilitates secure and efficient automation.
What's included
3 videos1 reading
3 videos• Total 16 minutes
- Introduction to Ansible• 4 minutes
- Ansible Core Versus Ansible Community• 7 minutes
- How Ansible Works?• 5 minutes
1 reading• Total 10 minutes
- Full Course Resources• 10 minutes
In this module, we will guide you through setting up the environment required for Ansible. From provisioning servers to configuring the controller node and understanding Ansible's agentless operations, this section ensures a strong foundation for further automation.
What's included
8 videos1 assignment
8 videos• Total 49 minutes
- Launching Required Nodes / Servers for Ansible Setup• 2 minutes
- Launching Ansible-Controller Node - CentOS9 Node from Windows WSL2• 11 minutes
- Installing Ansible-Core on CentOS9 with Python Version 3.9.x• 3 minutes
- Ansible Configuration to Work with Managed Nodes• 21 minutes
- Why Ansible Is Called Agentless Tool• 2 minutes
- Creating userId on Ansible Controller and Switching to ansadmin from userid• 6 minutes
- Simple Ansible Architecture• 2 minutes
- How to Get the Latest File or Directory from Current Location?• 3 minutes
1 assignment• Total 15 minutes
- Environment Setup - Assessment• 15 minutes
In this module, we will focus on Ansible's ad-hoc commands, an essential feature for executing tasks quickly and efficiently. You’ll learn how to leverage modules and handle complex commands with quotations and arguments.
What's included
4 videos1 assignment
4 videos• Total 30 minutes
- Introduction to Ansible Ad-Hoc Commands with Modules | Commands for Modules• 15 minutes
- Ansible Ad-Hoc Commands to Execute Any Unix/Linux Commands• 5 minutes
- Handling Arguments with Quotations• 2 minutes
- What Is the Backend Story to Execute Ansible Ad-Hoc Commands?• 7 minutes
1 assignment• Total 15 minutes
- Ad-Hoc Commands with Modules - Assessment• 15 minutes
In this module, we will delve into file management using Ansible ad-hoc commands. By mastering the file-related modules, you will learn to handle tasks such as file creation, modification, and retrieval across managed nodes seamlessly.
What's included
6 videos1 assignment
6 videos• Total 32 minutes
- List of File Modules to Work with files|file, Copy, lineinfile, blockinfile…• 5 minutes
- Ansible Ad-Hoc Commands with File Module to Create a File on Managed Nodes• 6 minutes
- Ansible Ad-Hoc Commands with stat Module• 3 minutes
- Ansible Ad-Hoc Commands with Copy Module• 6 minutes
- Ansible Ad-Hoc Commands with lineinfile Module to Append/Replace/Delete Lines• 8 minutes
- Ansible Ad-Hoc Command with Fetch Module to Download from Managed Nodes• 4 minutes
1 assignment• Total 15 minutes
- Ansible Ad-Hoc Command to Work with Files - Assessment• 15 minutes
In this module, we will learn to install software packages on different OS families using Ansible. You will gain hands-on experience with yum and apt modules to ensure consistent package management across diverse environments.
What's included
1 video1 assignment
1 video• Total 6 minutes
- Ansible Ad-Hoc Commands with yum and apt Modules to Install Packages• 6 minutes
1 assignment• Total 15 minutes
- Installing Packages on Different OS Families - Assessment• 15 minutes
In this module, we will explore how to run Ansible ad-hoc commands on the controller node itself. This knowledge is essential for tasks requiring local execution or testing configurations before deployment.
What's included
1 video
1 video• Total 2 minutes
- Executing Ansible Ad-Hoc Commands on Ansible Controller Node Itself• 2 minutes
In this module, we will focus on the idempotent nature of Ansible tasks. You will understand why predictable outputs are critical in automation and how to interpret task results to ensure reliable execution.
What's included
1 video1 assignment
1 video• Total 3 minutes
- Why Ansible Operations or Tasks Are Called Idempotent?• 3 minutes
1 assignment• Total 15 minutes
- Understanding the Output of Ansible Ad-Hoc Commands Output - Assessment• 15 minutes
In this module, we will guide you through executing ad-hoc commands with real-time user credentials. Learn how Ansible manages authentication securely and efficiently while maintaining compliance with best practices.
What's included
1 video1 assignment
1 video• Total 12 minutes
- Executing Ansible Ad-Hoc Commands with Your Real-Time User ID and Password• 12 minutes
1 assignment• Total 15 minutes
- Executing Ansible Ad-Hoc Commands with Your User ID and Password - Assessment• 15 minutes
In this module, we will explore Ansible inventory files. You will learn how to structure inventories to handle multiple environments, categorize hosts, and optimize automation workflows.
What's included
2 videos1 assignment
2 videos• Total 13 minutes
- Inventory File(s) to Work with Multiple Environments• 9 minutes
- Types of Ansible Inventory Files• 3 minutes
1 assignment• Total 15 minutes
- Ansible Inventory File(s) - Assessment• 15 minutes
In this module, we will focus on Ansible configuration files. You will understand how configuration settings are applied and how to manage these files to customize Ansible behavior effectively.
What's included
1 video1 assignment
1 video• Total 5 minutes
- Multiple Locations of Ansible Configuration Files and Their Priority• 5 minutes
1 assignment• Total 15 minutes
- Ansible Configuration File(s) - Assessment • 15 minutes
In this module, we will learn to enhance automation capabilities by embedding Ansible commands in shell scripts. This powerful combination enables you to handle intricate tasks with ease and precision.
What's included
1 video1 assignment
1 video• Total 3 minutes
- How to Use Ansible Ad-Hoc Commands in Shell Scripts• 3 minutes
1 assignment• Total 15 minutes
- Using Ansible Ad-hoc Commands in Shell Scripts - Assessment• 15 minutes
In this module, we will explore Ansible facts. You will learn how to use default facts and create custom facts to gather detailed information about your infrastructure for better automation strategies.
What's included
2 videos1 assignment
2 videos• Total 9 minutes
- Ansible Default Facts with setup Module• 4 minutes
- How to Create Custom Facts Based on Requirement• 5 minutes
1 assignment• Total 15 minutes
- Exploring Ansible Facts• 15 minutes
In this module, we will be introduced to Ansible playbooks, a cornerstone of automation. You will understand their structure, create your first playbook, and learn to verify syntax before execution.
What's included
5 videos1 assignment
5 videos• Total 35 minutes
- Introduction to Playbooks and Why We Need Playbooks• 11 minutes
- How to Use Visual Studio Code Editor to Develop Ansible Playbooks• 4 minutes
- First Playbook• 14 minutes
- Executing Playbooks on Ansible Controller Node Itself• 2 minutes
- Commands to Verify the Playbook Syntax• 4 minutes
1 assignment• Total 15 minutes
- Introduction to Playbooks• 15 minutes
In this module, we will cover foundational concepts for developing playbooks. From variables to YAML scripting, you will gain the skills to create adaptable and efficient automation scripts.
What's included
8 videos1 assignment
8 videos• Total 51 minutes
- Introduction to Ansible Custom Variables• 11 minutes
- Data Types of Variables• 7 minutes
- Data Structures of YAML Scripting• 6 minutes
- Read Variable Values from a File• 5 minutes
- Passing Variable(s) Value(s) from Command-Line• 4 minutes
- Usage of vars_prompt Section in Playbooks• 5 minutes
- host_vars and group_vars• 11 minutes
- Debug Module with vars and msg Arguments• 3 minutes
1 assignment• Total 15 minutes
- Basic Concepts to Develop Playbooks - Assessment• 15 minutes
In this module, we will delve into variable management in playbooks. Learn to register task outputs and redefine variables mid-playbook for seamless and dynamic automation workflows.
What's included
2 videos1 assignment
2 videos• Total 9 minutes
- Ansible Register Variable - To Capture the Output of a Task into Variable• 6 minutes
- Ansible Set Fact Variables - Define or Redefine Variable(s) in Between the Tasks• 2 minutes
1 assignment• Total 15 minutes
- Registered and setfacts Variables - Assessment• 15 minutes
In this module, we will explore various operations on variables in playbooks. You will learn to manipulate data using operators and filters, enhancing your ability to create dynamic and responsive playbooks.
What's included
11 videos1 assignment
11 videos• Total 35 minutes
- Types of Operators | Operations on Variables• 1 minute
- Arithmetic Operators• 2 minutes
- Filters and Methods Usage to Manipulate Data - Variable Data or Direct Data• 5 minutes
- Comparison Operators | Equal, Not-Equal, Greater, Lesser…• 2 minutes
- Membership Operators• 2 minutes
- Logical Operators• 1 minute
- Test Operators• 3 minutes
- Operations on List or Sequence• 8 minutes
- Operations on Strings• 4 minutes
- Operations on Dictionaries or Maps• 5 minutes
- Points to Remember• 2 minutes
1 assignment• Total 15 minutes
- Operations on Variables - Assessment• 15 minutes
In this module, we will master conditional statements in playbooks. From when clauses to in-line logic, you’ll learn to create adaptable and context-aware automation scripts.
What's included
2 videos1 assignment
2 videos• Total 10 minutes
- Conditional Statement with when• 4 minutes
- In-Line Conditional Statement with if-else• 6 minutes
1 assignment• Total 15 minutes
- Operations on Variables - Assessment• 15 minutes
In this module, we will practice creating basic playbooks. These exercises will reinforce your understanding of core playbook concepts and help you apply them in real-world scenarios.
What's included
4 videos1 assignment
4 videos• Total 32 minutes
- Design Simple Arithmetic Calculator• 8 minutes
- Simple Playbook to Find the Python Version• 8 minutes
- Playbook to Find the Java Version• 8 minutes
- Playbook to Execute Any Command• 8 minutes
1 assignment• Total 15 minutes
- Ansible Playbooks to Practice on Basic Concepts - Assessment• 15 minutes
In this module, we will deepen our understanding of Ansible facts. Learn to gather and utilize system-level information for advanced playbook automation.
What's included
3 videos1 assignment
3 videos• Total 17 minutes
- Working with Ansible Facts (Default Facts) Using Playbooks• 5 minutes
- Service or Systemd Facts with service_facts Module• 7 minutes
- inventory_hostname and hostvars• 5 minutes
1 assignment• Total 15 minutes
- Ansible Facts (Default Facts) and Systemd Facts - Assessment• 15 minutes
In this module, we will learn about privilege escalation in Ansible. You will understand how to execute tasks as different users or with elevated privileges safely and efficiently.
What's included
1 video1 assignment
1 video• Total 8 minutes
- Usage of become, become_user, and become_method• 8 minutes
1 assignment• Total 15 minutes
- Usage of become and become_user - Assessment• 15 minutes
In this module, we will explore task reusability. Learn how to use import_tasks and include_tasks to streamline your playbook development and ensure maintainability.
What's included
4 videos1 assignment
4 videos• Total 30 minutes
- Installing Given Package Based on OS Family• 7 minutes
- Install a Package Based on Managed Nodes Package Managers• 6 minutes
- Write a Playbook to Install Any Package(s)• 9 minutes
- How to Reuse Ansible-Tasks with import_tasks and include_tasks• 8 minutes
1 assignment• Total 15 minutes
- Installing Packages | Task Reusability with import_tasks and include_tasks - Assessment• 15 minutes
In this module, we will cover handlers, a powerful feature in Ansible. You’ll learn to create and manage handlers to execute tasks based on specific triggers, adding flexibility to your automation.
What's included
1 video1 assignment
1 video• Total 10 minutes
- How to Use Handlers and When Handlers Execute• 10 minutes
1 assignment• Total 15 minutes
- Efficient Use of Ansible Handlers - Assessment• 15 minutes
In this module, we will focus on the use of tags in playbooks. You will learn to execute only the necessary tasks, improving efficiency and precision in automation.
What's included
1 video1 assignment
1 video• Total 5 minutes
- How to Use Tags to Execute Tasks• 5 minutes
1 assignment• Total 15 minutes
- Usage of Tags to Execute Required Tasks - Assessment• 15 minutes
In this module, we will learn error-handling strategies in Ansible. From basic error handling to advanced constructs like block and rescue, you’ll ensure robust and fail-safe automation.
What's included
2 videos1 assignment
2 videos• Total 22 minutes
- Error Handling | Part-1• 7 minutes
- Error Handling with block and rescue and Also Grouping Multiple Tasks | Part-2• 15 minutes
1 assignment• Total 15 minutes
- Error Handling - Assessment• 15 minutes
In this module, we will explore Ansible logging. You’ll learn to capture task outputs and playbook execution details in log files, enabling effective debugging and auditing.
What's included
1 video1 assignment
1 video• Total 4 minutes
- Capturing the Output of Ansible Ad-Hoc Commands and Playbooks into a Log File• 4 minutes
1 assignment• Total 15 minutes
- Ansible Logging - Assessment• 15 minutes
In this module, we will explore advanced options like remote_src, delegate_to, and run_once. These features enable precise task control and efficient resource utilization.
What's included
2 videos1 assignment
2 videos• Total 34 minutes
- Install and Set JAVA_HOME as Environment Variable for All Applications• 19 minutes
- Playbook to Set JAVA_HOME for Any Open JDK with Valid URL• 15 minutes
1 assignment• Total 15 minutes
- Ansible Playbook for JAVA_HOME setup - Assessment• 15 minutes
In this module, we will create a comprehensive playbook combining various advanced features. You will see how to use tags, blocks, and handlers together to solve real-world automation challenges.
What's included
1 video1 assignment
1 video• Total 23 minutes
- Simple Real-Time Ansible Playbook with the Combination of Tags, Block and Handlers• 23 minutes
1 assignment• Total 15 minutes
- Simple Real-Time Ansible Playbook - Assessment• 15 minutes
In this module, we will explore the power of loops in playbooks. Learn to handle repetitive tasks and work with data structures like lists and dictionaries to simplify automation.
What's included
4 videos1 assignment
4 videos• Total 21 minutes
- Introduction to Loops• 5 minutes
- Loops to Work with List• 1 minute
- Installing Multiple Packages with Loops• 2 minutes
- Loops to Work Dictionaries• 12 minutes
1 assignment• Total 15 minutes
- Loops for Ansible Playbooks - Assessment 26• 15 minutes
In this module, we will learn to work with the template module. You’ll create dynamic, environment-specific configuration files that adapt seamlessly to changing requirements.
What's included
2 videos1 assignment
2 videos• Total 14 minutes
- Introduction to Template Module• 8 minutes
- Template File with Variables, Conditions, and Loops• 6 minutes
1 assignment• Total 15 minutes
- Working with Templates - Assessment• 15 minutes
In this module, we will introduce Ansible plugins. You’ll understand how plugins extend functionality and streamline complex automation scenarios.
What's included
1 video1 assignment
1 video• Total 3 minutes
- What Is an Ansible Plugin and How to List Required Plugins?• 3 minutes
1 assignment• Total 15 minutes
- Introduction to Plugin - Assessment• 15 minutes
In this module, we will explore third-party collections and modules. Learn to expand Ansible’s capabilities by integrating community-contributed resources effectively.
What's included
1 video1 assignment
1 video• Total 11 minutes
- Installing Required Collections or Required Module from Required Namespace• 11 minutes
1 assignment• Total 15 minutes
- Working with Third-Party or Ansible Community Collections or Modules - Assessment• 15 minutes
In this module, we will focus on dynamic inventory management. Discover how to use plugins to manage AWS resources dynamically and streamline inventory handling.
What's included
2 videos1 assignment
2 videos• Total 31 minutes
- Ansible Dynamic Inventory for AWS with Plugin• 15 minutes
- Ansible Dynamic Inventory and Working with Managed Nodes Using Default ec2-us• 16 minutes
1 assignment• Total 15 minutes
- Ansible Dynamic Inventory with Plugins - Assessment• 15 minutes
In this module, we will explore Ansible roles. Learn how to simplify playbook organization by structuring tasks into reusable roles for improved clarity and scalability.
What's included
1 video1 assignment
1 video• Total 13 minutes
- Introduction to Ansible Roles• 13 minutes
1 assignment• Total 15 minutes
- Ansible Roles - Assessment• 15 minutes
In this module, we will learn about Ansible Vault. You’ll gain the skills to encrypt sensitive information and manage secrets securely within your automation workflows.
What's included
1 video1 assignment
1 video• Total 14 minutes
- How to Use Ansible Vault to Encrypt Secrets• 14 minutes
1 assignment• Total 15 minutes
- Using Ansible Vault for Secure Playbook Management - Assessment• 15 minutes
In this module, we will explore the Raw module. Learn to manage systems without Python installed and execute commands directly on target nodes efficiently.
What's included
1 video1 assignment
1 video• Total 4 minutes
- Working with Managed Nodes if Managed Nodes Are Installed with Python• 4 minutes
1 assignment• Total 15 minutes
- Raw Module - Assessment• 15 minutes
In this module, we will set up a real-time Ansible project. From directory structures to secure authentication methods, you’ll prepare a robust foundation for managing live server environments.
What's included
4 videos3 assignments
4 videos• Total 31 minutes
- Different Cases to Work with Remote Servers or Managed Nodes• 2 minutes
- Directory Structure for Real-Time Project• 4 minutes
- Working with User ID and Password for Ansible Ad-Hoc Commands and Playbooks• 15 minutes
- Working with SSH Keys for Ansible Ad-Hoc Commands and Playbooks• 11 minutes
3 assignments• Total 90 minutes
- Ansible Project Setup for Real Time to Work with Servers - Assessment• 15 minutes
- Full Course Assessment• 60 minutes
- Full Course Practice Assessment• 15 minutes
Instructor

Offered by

Offered by

Packt helps tech professionals put software to work by distilling and sharing the working knowledge of their peers. Packt is an established global technical learning content provider, founded in Birmingham, UK, with over twenty years of experience delivering premium, rich content from groundbreaking authors on a wide range of emerging and popular technologies.
Explore more from Support and Operations
WWhizlabs
Course
BBoard Infinity
Course

Course

Course
Why people choose Coursera for their career

Felipe M.

Jennifer J.

Larry W.

Chaitanya A.

Open new doors with Coursera Plus
Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Join over 3,400 global companies that choose Coursera for Business
Upskill your employees to excel in the digital economy
Frequently asked questions
Yes, you can preview the first video and view the syllabus before you enroll. You must purchase the course to access content not included in the preview.
If you decide to enroll in the course before the session start date, you will have access to all of the lecture videos and readings for the course. You’ll be able to submit assignments once the session starts.
Once you enroll and your session begins, you will have access to all videos and other resources, including reading items and the course discussion forum. You’ll be able to view and submit practice assessments, and complete required graded assignments to earn a grade and a Course Certificate.
If you complete the course successfully, your electronic Course Certificate will be added to your Accomplishments page - from there, you can print your Course Certificate or add it to your LinkedIn profile.
This course is currently available only to learners who have paid or received financial aid, when available.
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.
More questions
Financial aid available,