© Michael Heap 2016

Michael Heap, Ansible, 10.1007/978-1-4842-1659-0_5

5. Parameterizing Playbooks

Michael Heap

(1)Reading, Berkshire, UK

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.

Ansible has great support for variables, allowing you to use them both in playbooks and in files that are copied to the remote machine. You ...

Get Ansible: From Beginner to Pro now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.