Bug fixes after testing

This commit is contained in:
David Petric
2023-03-28 10:24:45 +02:00
parent 5ff2c19628
commit 314c2a1527
7 changed files with 65 additions and 21 deletions

View File

@ -2,23 +2,38 @@
- name: Download latest WP
get_url:
url: https://wordpress.org/latest.zip
dest: /var/www/{{ vhost_name }}
dest: /tmp/latest.zip
mode: '0660'
- name: Extract wordpress
unarchive:
src: /var/www/{{ vhost_name }}/latest.zip
dest: /var/www/{{ vhost_name }}
src: /tmp/latest.zip
dest: /var/www/
remote_src: yes
- name: Delete the wordpress zip
file:
state: absent
path: /var/www/{{ vhost_name }}/latest.zip
path: /tmp/latest.zip
- name: Setup permissions
- name: Create wwwroot
file:
path: /var/www/{{ vhost_name }}
owner: www-data
group: www-data
mode: '0644'
path: /var/www/{{ vhost_name}}
state: directory
mode: '0755'
- name: Rename folder
shell: mv /var/www/wordpress/* /var/www/{{ vhost_name }}/
- name: Delete old folder
file:
path: /var/www/wordpress
state: absent
- name: Chown
become: true
shell: chown -R www-data:www-data /var/www/{{ vhost_name }}
- name: Chmod
become: true
shell: chmod -R 755 /var/www/{{ vhost_name }}