From a06dccd2e6caba305f9d1f687f162c43874f99f6 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/apache/templates/wordpress-site.conf.j2 | 2 -- roles/wordpress/tasks/main.yml | 1 + roles/wordpress/templates/config-localhost.php.j2 | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/apache/templates/wordpress-site.conf.j2 b/roles/apache/templates/wordpress-site.conf.j2 index dbdd32e..5776a5f 100644 --- a/roles/apache/templates/wordpress-site.conf.j2 +++ b/roles/apache/templates/wordpress-site.conf.j2 @@ -1,5 +1,3 @@ -Listen 8000 - SSLEngine off DocumentRoot /var/www/html/wordpress 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/'); ?>