Abstract
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.
Keywords
- 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.
This is a preview of subscription content, access via your institution.
Buying options




Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Michael Heap
About this chapter
Cite this chapter
Heap, M. (2016). Parameterizing Playbooks. In: Ansible. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1659-0_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1659-0_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1660-6
Online ISBN: 978-1-4842-1659-0
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books