ansible-role-wordpress/tasks/wp_nginx.yml

14 lines
493 B
YAML

---
- block:
- name: Install the nginx virtualhost
template: src=nginx_wordpress.conf.j2 dest=/etc/nginx/sites-available/wordpress.conf mode=0444
with_items: '{{ phpfpm_pools }}'
notify: Reload nginx
- name: Enable the nginx virtualhost
file: src=/etc/nginx/sites-available/wordpress.conf dest=/etc/nginx/sites-enabled/wordpress.conf state=link
notify: Reload nginx
when: wordpress_local_nginx_virtualhost | bool
tags: [ 'wordpress', 'nginx', 'virtualhost' ]