Skip to content

Instantly share code, notes, and snippets.

@whelmed
Created November 7, 2016 19:08
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save whelmed/e1b67743d85b401ebb7b5f92edeb4ed0 to your computer and use it in GitHub Desktop.
Save whelmed/e1b67743d85b401ebb7b5f92edeb4ed0 to your computer and use it in GitHub Desktop.
The final result of our LAMP demo
---
- hosts: all
gather_facts: false
connection: local
become: yes
vars:
packages:
- apache2
- mysql-server
- mysql-common
- mysql-client
services:
- apache2
- mysql
tasks:
- name: Install our packages
apt:
name: "{{ item }}"
state: present
with_items: "{{ packages }}"
- name: Confirm services are running
service:
name: "{{ item }}"
state: running
with_items: "{{ services }}"
- name: Enable Apache2 modssl
shell: a2enmod ssl
- name: Enable Apache2 Default HTTPS site
shell: a2ensite default-ssl
- name: Restart Apache
service:
name: apache2
state: restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment