Welcome to the Ansible User Guide! This guide covers how to work with Ansible, including using the command line, working with inventory, interacting with data, writing tasks, plays, and playbooks; executing playbooks, and reference materials. This page outlines the most common situations and questions that bring readers to this section. If you prefer a traditional table of contents, you can find one at the bottom of the page.
Writing tasks, plays, and playbooks
Working with inventory
- I have a list of servers and devices I want to automate. How do I create inventory to track them?
- I use cloud services and constantly have servers and devices starting and stopping. How do I track them using dynamic inventory?
- I want to automate specific sub-sets of my inventory. How do I use patterns?
Interacting with data
- I want to use a single playbook against multiple systems with different attributes. How do I use variables to handle the differences?
- I want to retrieve data about my systems. How do I access Ansible facts?
- I need to access sensitive data like passwords with Ansible. How can I protect that data with Ansible vault?
- I want to change the data I have, so I can use it in a task. How do I use filters to transform my data?
- I need to retrieve data from an external datastore. How do I use lookups to access databases and APIs?
- I want to ask playbook users to supply data. How do I get user input with prompts?
- I use certain modules frequently. How do I streamline my inventory and playbooks by setting default values for module parameters?
Once your playbook is ready to run, you may need to use these topics:
Advanced features and reference
Traditional Table of Contents
If you prefer to read the entire User Guide, here’s a list of the pages in order: