1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00
iiab/roles/awstats/tasks/nginx.yml

17 lines
551 B
YAML
Raw Normal View History

2020-02-02 12:55:43 +00:00
- name: Enable http://box/awstats via NGINX, by installing {{ nginx_conf_dir }}/awstats-nginx.conf from template
template:
src: awstats-nginx.conf
dest: "{{ nginx_conf_dir }}/" # /etc/nginx/conf.d
when: awstats_enabled
2020-02-02 12:55:43 +00:00
- name: Disable http://box/awstats via NGINX, by removing {{ nginx_conf_dir }}/awstats-nginx.conf
file:
path: "{{ nginx_conf_dir }}/awstats-nginx.conf" # /etc/nginx/conf.d
state: absent
when: not awstats_enabled
- name: Restart 'nginx' systemd service
systemd:
name: nginx
state: restarted