From f8c2b6d4f2c062e5997f7c267259436a86f44dac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Tue, 7 May 2024 15:47:29 +0300 Subject: [PATCH] Deployer Tasks: Fix Issue 3 --- tasks/deployer.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tasks/deployer.yml b/tasks/deployer.yml index d92abb2..1340ea1 100644 --- a/tasks/deployer.yml +++ b/tasks/deployer.yml @@ -160,8 +160,16 @@ - name: "Deployer - Wordpress - Create Folder" file: - path: "/root/wordpress/data/wp-content" + path: "{{ path }}" state: directory + vars: + paths: + - /root/wordpress/data/wp-content/plugins + - /root/wordpress/data/wp-content/uploads + loop: "{{ paths }}" + loop_control: + label: "{{ path }}" + loop_var: "path" tags: - wordpress @@ -204,7 +212,8 @@ recreate: on network: host volumes: - - "/root/wordpress/data/wp-content/:/var/www/html/wp-content/" + - "/root/wordpress/data/wp-content/plugins:/var/www/html/wp-content/plugins" + - "/root/wordpress/data/wp-content/uploads:/var/www/html/wp-content/uploads" - "/root/wordpress/conf/000-default.conf:/etc/apache2/sites-enabled/000-default.conf" - "/root/wordpress/conf/ports.conf:/etc/apache2/ports.conf" env: