Last active
October 12, 2016 22:10
-
-
Save april/e129c297e345bc73ed5ffc1cced45052 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--- | |
- hosts: web | |
become: true | |
become_user: root | |
tasks: | |
- name: Install nginx signing key | |
apt_key: url=https://nginx.org/keys/nginx_signing.key state=present | |
- name: Add nginx binary repository | |
apt_repository: repo='deb https://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx' state=present | |
- name: Add nginx source repository | |
apt_repository: repo='deb-src https://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx' state=present | |
- name: Install nginx | |
apt: pkg=nginx state=installed update_cache=true | |
notify: | |
- Restart nginx | |
- name: Install pokeinthe.io nginx configuration | |
copy: src=../files/nginx-pokeinthe.io.conf dest=/etc/nginx/sites-available/pokeinthe.io.conf mode=0644 owner=root group=root | |
notify: | |
- Reload nginx | |
handlers: | |
- name: Restart nginx | |
service: name=nginx state=restarted | |
- name: Reload nginx | |
service: name=nginx state=reloaded |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment