Added more PHP modules needed for wordpress
Add the ability to change php.ini config for FPM
Increase default upload size
Minor formatting and alphabetization fixes
Change-Id: Ida40bc2c51f2b6d4bb7fac61316e476ab42fc274
diff --git a/defaults/main.yml b/defaults/main.yml
index c485bf7..10e2dbf 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -18,11 +18,17 @@
pm.max_spare_servers: 10
pm.max_requests: 500
+php_ini_config:
+ upload_max_filesize: "32M"
+ post_max_size: "32M"
# Packages required for Wordpress and ONF Website
php_packages:
- - "php7.4-fpm"
- "php7.4-curl"
+ - "php7.4-fpm"
+ - "php7.4-gd"
- "php7.4-gmagick"
+ - "php7.4-mbstring"
- "php7.4-mysql"
- "php7.4-xml"
+ - "php7.4-zip"
diff --git a/tasks/Debian.yml b/tasks/Debian.yml
index 7238c89..dd8e9b7 100644
--- a/tasks/Debian.yml
+++ b/tasks/Debian.yml
@@ -40,6 +40,7 @@
cache_valid_time: 3600
notify:
- start-php
+ - restart-php # load new packages
- name: Configure PHP-FPM service
lineinfile:
@@ -49,3 +50,12 @@
loop: "{{ php_fpm_config | dict2items }}"
notify:
- restart-php
+
+- name: Configure PHP-FPM php.ini file
+ lineinfile:
+ path: "/etc/php/{{ php_version }}/fpm/php.ini"
+ regexp: "^{{ item.key }}.*$"
+ line: "{{ item.key }} = {{ item.value }}"
+ loop: "{{ php_ini_config | dict2items }}"
+ notify:
+ - restart-php
diff --git a/tasks/main.yml b/tasks/main.yml
index 3a9df11..4e9a453 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -10,7 +10,6 @@
- name: include OS-specific tasks
include_tasks: "{{ ansible_os_family }}.yml"
-
- name: Enable PHP-FPM Service
service:
name: "{{ php_fpm_service }}"