最近更新的页面
Module defaults
If you frequently call the same module with the same arguments, it can be useful to define defaul...
Loops
Ansible offers the loop, with_<lookup>, and until keywords to execute a task multiple times. E...
Lookups
Lookup plugins retrieve data from outside sources such as files, databases, key/value stores, API...
Ansible playbooks<span id="about_playbooks"></span>
Ansible Playbooks provide a repeatable, reusable, simple configuration management and multimachin...
Handlers: running operations on change
Sometimes you want a task to run only when a change is made on a machine. For example, you may wa...
Using filters to manipulate data
Filters let you transform JSON data into YAML data, split a URL to extract the hostname, get the ...
Executing playbooks
Ready to run your Ansible playbook? Running complex playbooks requires some trial and error so le...
Error handling in playbooks
When Ansible receives a non-zero return code from a command or a failure from a module, by defaul...
Setting the remote environment
1.1 You can use the environment keyword at the play, block, or task level to set an environment ...
Controlling where tasks run: delegation and local actions
By default, Ansible gathers facts and executes all tasks on the machines that match the hosts li...
Debugging tasks
Ansible offers a task debugger so you can fix errors during execution instead of editing your pla...
Conditionals
In a playbook, you may want to execute different tasks or have different goals, depending on the ...
Validating tasks: check mode and diff mode
Ansible provides two modes of execution that validate tasks: check mode and diff mode. These mode...
Blocks
Blocks create logical groups of tasks. Blocks also offer ways to handle task errors, similar to e...
Asynchronous actions and polling
By default, Ansible runs tasks synchronously, holding the connection to the remote node open unti...
Advanced playbook syntax
The advanced YAML syntax examples on this page give you more control over the data placed in YAML...
Working with playbooks
Playbooks record and execute Ansible's configuration, deployment, and orchestration functions. Th...
Search paths in Ansible
You can control the paths Ansible searches to find resources on your control node (including conf...
Using Ansible playbooks
[!NOTE] Making Open Source More Inclusive Red Hat is committed to replacing problematic language ...
Playbook Example: Continuous Delivery and Rolling Upgrades
What is continuous delivery? Continuous delivery (CD) means frequently delivering updates to your...