2020-01-29 13:47:39 +00:00
|
|
|
- name: Enable http://box{{ wp_url }} via NGINX, by installing {{ nginx_conf_dir }}/wordpress-nginx.conf from template # http://box/wordpress
|
2020-01-23 20:22:51 +00:00
|
|
|
template:
|
|
|
|
src: wordpress-nginx.conf.j2
|
2020-01-24 06:08:42 +00:00
|
|
|
dest: "{{ nginx_conf_dir }}/wordpress-nginx.conf" # /etc/nginx/conf.d
|
2020-01-29 14:48:29 +00:00
|
|
|
when: wordpress_enabled | bool
|
2020-01-23 20:22:51 +00:00
|
|
|
|
2020-01-29 13:47:39 +00:00
|
|
|
- name: Disable http://box{{ wp_url }} via NGINX, by removing {{ nginx_conf_dir }}/wordpress-nginx.conf # http://box/wordpress
|
2020-01-23 20:22:51 +00:00
|
|
|
file:
|
2020-01-24 06:08:42 +00:00
|
|
|
path: "{{ nginx_conf_dir }}/wordpress-nginx.conf" # /etc/nginx/conf.d
|
2020-01-23 20:22:51 +00:00
|
|
|
state: absent
|
|
|
|
when: not wordpress_enabled
|
|
|
|
|
|
|
|
- name: Restart 'nginx' systemd service
|
|
|
|
systemd:
|
|
|
|
name: nginx
|
|
|
|
state: restarted
|