forked from geerlingguy/ansible-role-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from singleplatform-eng/SPROD-4044_install_mana…
…ge_blocks install and manage blocks
- Loading branch information
Showing
2 changed files
with
29 additions
and
23 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
--- | ||
# Setup/install tasks. | ||
- include: setup-RedHat.yml | ||
when: ansible_os_family == 'RedHat' | ||
when: ansible_os_family == 'RedHat' and nginx_install | ||
|
||
- include: setup-Debian.yml | ||
when: ansible_os_family == 'Debian' | ||
when: ansible_os_family == 'Debian' and nginx_install | ||
|
||
# SSL configuration | ||
- include: ssl.yml | ||
- block: | ||
- name: Ensure nginx is enabled to start at boot. | ||
service: name=nginx enabled=yes | ||
|
||
# Vhost configuration. | ||
- include: vhosts.yml | ||
# SSL configuration | ||
- include: ssl.yml | ||
|
||
- name: Add group and other access to /etc/nginx | ||
file: | ||
path: /etc/nginx | ||
mode: 'go+rx' | ||
recurse: no | ||
# Vhost configuration. | ||
- include: vhosts.yml | ||
|
||
# Nginx setup. | ||
- name: Copy nginx configuration in place. | ||
template: | ||
src: nginx.conf.j2 | ||
dest: /etc/nginx/nginx.conf | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- reload nginx | ||
- name: Add group and other access to /etc/nginx | ||
file: | ||
path: /etc/nginx | ||
mode: 'go+rx' | ||
recurse: no | ||
|
||
- name: Ensure nginx is started and enabled to start at boot. | ||
service: name=nginx state=started enabled=yes | ||
# Nginx setup. | ||
- name: Copy nginx configuration in place. | ||
template: | ||
src: nginx.conf.j2 | ||
dest: /etc/nginx/nginx.conf | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- reload nginx | ||
when: nginx_manage |