Skip to main content

Introducing new learning courses and educational videos from Apress. Start watching

Book cover

Ansible pp 63–82Cite as

Apress

Parameterizing Playbooks

  • 2249 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • DOI: 10.1007/978-1-4842-1659-0_5
  • Chapter length: 20 pages
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
eBook
USD   39.99
Price excludes VAT (USA)
  • ISBN: 978-1-4842-1659-0
  • Instant PDF download
  • Readable on all devices
  • Own it forever
  • Exclusive offer for individuals only
  • Tax calculation will be finalised during checkout
Softcover Book
USD   49.99
Price excludes VAT (USA)
Figure 5-1.
Figure 5-2.
Figure 5-3.
Figure 5-4.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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