In this article I will explain how to do a simple web server configuration using Ansible. The goal will be to automatically install Apache web server and PHP. In additional to that, we will also instruct Apache to start automatically at boot. 

Creating a Playbook

Our first goal is to create a playbook. The playbook is what Ansible uses to apply a desired configuration to a server. Let’s go ahead and create one now.

  1. Create a file named webserver.yml
  2. Open the file into a text editor.