Created
May 2, 2017 22:13
-
-
Save pspravin/76d0143436176286dc46975505fb39f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[opc@vm04 ansible]$ vi webserver.yml | |
--- | |
- 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