ansible-personal/roles/nginx/tasks/wordpress.yml
Alan Orth 1da0da53ec
roles: use longer format for when conditionals
When the condition is an AND we can use this more succinct format.
2022-09-10 23:12:49 +03:00

20 lines
680 B
YAML

---
- block:
- name: Install WordPress
ansible.builtin.git: repo=https://github.com/WordPress/WordPress.git dest={{ nginx_root_prefix }}/{{ item.domain_name }}/wordpress version={{ item.wordpress_version }} depth=1 force=true
when:
- item.has_wordpress is defined
- item.has_wordpress == true
loop: "{{ nginx_vhosts }}"
- name: Fix WordPress directory permissions
ansible.builtin.file: path={{ nginx_root_prefix }}/{{ item.domain_name }} state=directory owner=nginx group=nginx recurse=true
when:
- item.has_wordpress is defined
- item.has_wordpress == true
loop: "{{ nginx_vhosts }}"
tags: wordpress
# vim: set ts=2 sw=2: