Fix wordpress detection logic

This commit is contained in:
David Petric 2023-04-07 18:22:32 +02:00
parent cb91f1a9fe
commit 946abccfeb
2 changed files with 7 additions and 6 deletions

View File

@ -1,10 +1,4 @@
--- ---
- name: Create wwwroot
file:
path: /var/www/{{ vhost_name }}
state: directory
mode: '0755'
- name: Prepare config file - name: Prepare config file
template: template:
src: files/vhost.conf.j2 src: files/vhost.conf.j2

View File

@ -4,6 +4,13 @@
path: /var/www/{{ vhost_name }} path: /var/www/{{ vhost_name }}
register: project_dir register: project_dir
- name: Create wwwroot
file:
path: /var/www/{{ vhost_name }}
state: directory
mode: '0755'
when: not project_dir.stat.exists
- name: Download latest WP - name: Download latest WP
get_url: get_url:
url: https://wordpress.org/latest.zip url: https://wordpress.org/latest.zip