Ansible pp 63-82 | Cite as

Parameterizing Playbooks

  • Michael Heap


In the previous chapter, you worked on getting your playbook split up into various reusable roles. These roles, however, all have a static configuration. Each time you use them, they will install the same software with the same configuration, and you have no way to tweak the values being used. If you want to change a configuration value, you have to edit the role directly. As you can imagine, this is far from ideal, because when the role updates, your changes will be lost. In this chapter, you’ll add variable support to your WordPress role so that it can be used to configure a custom WordPress installation. Once you’ve done that, we’ll cover all of the different places that variables can be defined in Ansible and how each one can be used when you’re writing a playbook.


Virtual Machine Configuration File Host Variable Remote Machine Setup Module 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Michael Heap 2016

Authors and Affiliations

  • Michael Heap
    • 1
  1. 1.ReadingUK

Personalised recommendations