From 04a3a1c37f54e2eb610097aaf64830681601a39e Mon Sep 17 00:00:00 2001 From: David Petric Date: Fri, 7 Apr 2023 18:33:50 +0200 Subject: [PATCH] WP-config.php permissions --- roles/configure-wordpress/tasks/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/configure-wordpress/tasks/main.yml b/roles/configure-wordpress/tasks/main.yml index a6ec071..3ad2c62 100644 --- a/roles/configure-wordpress/tasks/main.yml +++ b/roles/configure-wordpress/tasks/main.yml @@ -9,3 +9,13 @@ src: files/wp-config.php.j2 dest: /var/www/{{ vhost_name }}/wp-config.php when: not project_config.stat.exists + +- name: Chown + become: true + shell: chown -R www-data:www-data /var/www/{{ vhost_name }}/wp-config.php + when: not project_config.stat.exists + +- name: Chmod + become: true + shell: chmod -R 755 /var/www/{{ vhost_name }}/wp-config.php + when: not project_config.stat.exists \ No newline at end of file