Ansible pp 49-62 | Cite as

Ansible Roles

  • Michael Heap


Thus far, you’ve installed all of the dependencies for WordPress and gotten an instance of it configured. The playbook wasn’t the easiest thing to read, though, and it wasn’t very reusable. In this chapter, we’re going to refactor this playbook so that it is split up into logical sections. We’ll have one role that installs PHP, one for nginx, another for MySQL, and, finally, one for WordPress. Not only will this make the playbooks easier to follow, but it will also make them reusable.


Extension Point Task File Role Section File Directory Template Directory 
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