From 43f18f4e73cd2377afd6b560ccc451ad637eec19 Mon Sep 17 00:00:00 2001 From: David Petric Date: Fri, 7 Apr 2023 18:31:24 +0200 Subject: [PATCH] Bug fixes --- roles/configure-wordpress/tasks/main.yml | 40 ++++++------------------ 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/roles/configure-wordpress/tasks/main.yml b/roles/configure-wordpress/tasks/main.yml index aafc535..a6ec071 100644 --- a/roles/configure-wordpress/tasks/main.yml +++ b/roles/configure-wordpress/tasks/main.yml @@ -1,33 +1,11 @@ --- -- name: PHP ini setup - copy: - src: files/php{{ php_version }}.ini - dest: /etc/php/{{ php_version }}/fpm/php.ini +- name: Task name + stat: + path: /var/www/{{ vhost_name }}/wp-config.php + register: project_config -- name: Increase PHP memory limit - become: true - lineinfile: - dest: /etc/php/{{ php_version }}/fpm/php.ini - regexp: "memory_limit =" - line: "memory_limit = 512M" - -- name: Increase PHP upload time - become: true - lineinfile: - dest: /etc/php/{{ php_version }}/fpm/php.ini - regexp: "max_input_time =" - line: "max_input_time = 120" - -- name: Increase PHP post size - become: true - lineinfile: - dest: /etc/php/{{ php_version }}/fpm/php.ini - regexp: "post_max_size =" - line: "post_max_size = 20M" - -- name: Start PHP - systemd: - name: "php{{ php_version }}-fpm" - daemon_reload: yes - enabled: yes - state: started +- name: Copy Configuration file + template: + src: files/wp-config.php.j2 + dest: /var/www/{{ vhost_name }}/wp-config.php + when: not project_config.stat.exists