4

Deploying a LAMP Stack

This chapter will look at deploying a complete LAMP stack using the various core modules that ship with Ansible. We will target the local Multipass virtual machine we first used in Chapter 1, Installing and Running Ansible.

We will discuss the following:

  • The playbook layout – how our playbook is going to be structured
  • Linux – preparing the Linux server
  • Apache – installing and configuring Apache
  • MariaDB – installing and configuring MariaDB
  • PHP – installing and configuring PHP

This chapter covers the following topics:

  • The playbook structure
  • The LAMP stack
  • The LAMP playbook

Before we start writing the playbook, we will discuss the structure we will use after we briefly discuss what we need for the chapter.

Technical ...

Get Learn Ansible - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.