Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
vars Updating setup and lemp playbooks Nov 27, 2019
playbook.yml Updated readme, added become:true to playbooks Dec 4, 2019 Updating README files Dec 6, 2019

LEMP on Ubuntu 18.04

This playbook will install a LEMP environment on an Ubuntu 18.04 machine, as explained in the guide on How to Use Ansible to Install and Set Up LEMP on Ubuntu 18.04. A virtualhost will be created with the options specified in the vars/default.yml variable file.


  • mysql_root_password: the password for the MySQL root account.
  • http_host: your domain name.
  • http_conf: the name of the configuration file that will be created within Apache.
  • http_port: HTTP port, default is 80.

Running this Playbook

Quick Steps:

1. Obtain the playbook

git clone
cd ansible-playbooks/lemp_ubuntu1804

2. Customize Options

nano vars/default.yml
mysql_root_password: "mysql_root_password"
http_host: "your_domain"
http_conf: "your_domain.conf"
http_port: "80"

3. Run the Playbook

ansible-playbook -l [target] -i [inventory file] -u [remote user] playbook.yml

For more information on how to run this Ansible setup, please check this guide: How to Use Ansible to Install and Set Up LEMP on Ubuntu 18.04.

You can’t perform that action at this time.