1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00
iiab/roles/awstats/tasks/nginx.yml
2020-02-02 07:55:43 -05:00

16 lines
558 B
YAML

- 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 | bool
- 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