Loading...
Real Time Concepts

Instant LAMP Deployment Ansible Playbooks

What this does

This version of the Ansible playbook is hosted and maintained here:
https://github.com/dannylujan/lamp-fpm-centos-7
This playbook will set up LAMP on a clean install.
It sets up

Q and A

Q: How is this different from the Ansible playbooks used in “Running the LAMP Deployment Manually”?

A: This new version of the playbook is stripped down to only work on RHEL/CentOS 7, it uses PHP-FPM by default, has logic to detect iptables or firewalld, as well as other modern improvements. See “What this does” for more details.

Q: Why only RHEL/CentOS 7?

A: As a majority of our clients will be using RHEL/CentOS 7 it was decided that this playbook should focus on it first and add functionality for Debian and Ubuntu at a later date.

Q: Does this have support to install other packages?

A: At the moment it does not, but this is being evaluated as this was a feature of the original playbooks.

Reporting Bugs

Please comment on this article below.

Usage

RHEL/CentOS 7

Hammertime installation (recommended)

git clone https://github.com/dannylujan/lamp-fpm-centos-7
cd lamp-fpm-centos-7/
export ANSIBLE_HOST_KEY_CHECKING=False
ht { UUID or Server ID } –sudo –playbook –ansible-args site-fpm.yml

oneliner:
git clone https://github.com/dannylujan/lamp-fpm-centos-7 && cd lamp-fpm-centos-7/ && export
ANSIBLE_HOST_KEY_CHECKING=False && ht { UUID or Server ID } –sudo –playbook –ansible-args site-fpm.yml

Manual installation

This is not recommended as you need to SSH into the server and install things from pip and other python packages, but its here in case Hammertime has issues.

yum install -y libffi-devel openssl-devel python-pip git python-devel python-virtualenv gcc &&
virtualenv /root/lampenv &&
. /root/lampenv/bin/activate &&
pip install –upgrade pip &&
pip install paramiko PyYAML jinja2 httplib2 ansible==2.8.4 markupsafe –upgrade &&
git clone https://github.com/dannylujan/lamp-fpm-centos-7 &&
cd lamp-fpm-centos-7/ &&
ansible-playbook -i hosts site-fpm.yml &&
deactivate

Upon running this you will be presented with a prompt to input the following:

Default domain name: The primary domain the customer wishes to use. If you do not have this domain, enter example.com and the playbook will create a vhost and pool that can be modified later

Default domain SFTP user: This will create an SFTP user for customer, assign ownership to the document root and pool.

SFTP password: Enter the desired password here.

References

Leave a Reply

Your email address will not be published. Required fields are marked *