From 46be9a95ea2ca2425b2b024952bf094fbf4b3e21 Mon Sep 17 00:00:00 2001 From: Aurelien Rebourg Date: Tue, 23 May 2023 04:06:56 +0200 Subject: [PATCH] add root to run wordpress --- roles/wordpress/tasks/main.yml | 1 + roles/wordpress/templates/config-localhost.php.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/wordpress/tasks/main.yml b/roles/wordpress/tasks/main.yml index 88af375..1afcd20 100644 --- a/roles/wordpress/tasks/main.yml +++ b/roles/wordpress/tasks/main.yml @@ -2,6 +2,7 @@ - name: Import Wordpress remote_user: ansible + become: true ansible.builtin.import_tasks: wordpress.yml diff --git a/roles/wordpress/templates/config-localhost.php.j2 b/roles/wordpress/templates/config-localhost.php.j2 index e3a74cc..f5780ec 100644 --- a/roles/wordpress/templates/config-localhost.php.j2 +++ b/roles/wordpress/templates/config-localhost.php.j2 @@ -3,7 +3,7 @@ define('DB_USER', '{{ mysql_user_name }}'); define('DB_PASSWORD', '{{ mysql_user_pass }}'); define('DB_HOST', 'localhost'); - define('WP_CONTENT_DIR', '/var/lib/wordpress/wp-content'); + define('WP_CONTENT_DIR', '/var/www/html/wordpress/wp-content'); define('WP_HOME', 'https://192.168.3.2/blog/'); define('WP_SITEURL', 'https://192.168.3.2/blog/'); ?>