Bug fixes

This commit is contained in:
David Petric 2023-04-07 18:31:24 +02:00
parent 9233530e50
commit 43f18f4e73

View File

@ -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