ansible-role-wordpress/tasks/wp_nginx.yml

14 lines
502 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: '{{ wordpress_phpfpm_pool }}'
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' ]