Skip to content

Instantly share code, notes, and snippets.

@rednerrus
Created May 2, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rednerrus/4673cba7e3dece1d010ff31877778829 to your computer and use it in GitHub Desktop.
Save rednerrus/4673cba7e3dece1d010ff31877778829 to your computer and use it in GitHub Desktop.
With spaces.
---
- hosts: webserver
become: true
tasks:
- name: install epel
yum: name="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm" state=present
- name: install web components
yum: name={{item}} state=present
with_items:
- httpd
- mod_wsgi
- python-pip
- python-virtualenv
- name: ensure apache started
service: name=httpd state=started enabled=yes
- name: ensure mod_wsgi enabled
modules: state=present name=mod_wsgi
notify: restart httpd
handlers:
- name: restart httpd
service: name=httpd state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment