These playbooks are meant to be a reference and starter's guide to building Ansible Playbooks. These playbooks were tested on CentOS 6.x so we recommend that you use CentOS or RHEL to test these modules.
Create a sample inventory file. The inventory file contains a grouped list of hostnames that are managed by Ansible. The command below will just add "localhost" to the host list.
Now we set up our LAMP stack. The stack can be on a single node or multiple nodes. The inventory file 'hosts' defines the nodes in which the stacks should be configured.
Here the webserver would be configured on the local host and the dbserver on a server called "bensible". The stack can be deployed using the following command:
Once done, you can check the results by browsing to http://localhost/index.php. You should see a simple test page and a list of databases retrieved from the database server.