diff roles/install-php/tasks/main.yml @ 27:1f1ecee8072b

fix restart php-fpm
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Thu, 03 Sep 2020 12:45:12 +0900
parents f987206d7e7a
children 94d62666b307
line wrap: on
line diff
--- a/roles/install-php/tasks/main.yml	Thu Sep 03 11:20:27 2020 +0900
+++ b/roles/install-php/tasks/main.yml	Thu Sep 03 12:45:12 2020 +0900
@@ -8,4 +8,43 @@
       - php-mysqlnd
       - php-mbstring
       - php-fpm
+      - php-cli
+      - php-json
+      - php-opcache
+      - php-xml
+      - php-gd
+      - php-curl
     state: latest
+
+- name: replace /etc/php-fpm.d/www.conf
+  become: yes
+  replace:
+    path: /etc/php-fpm.d/www.conf
+    regexp: 'apache'
+    replace: 'nginx'
+  notify: restart_php_fpm
+
+- name: replace /etc/php-fpm.d/www.conf
+  become: yes
+  replace:
+    path: /etc/php-fpm.d/www.conf
+    regexp: '(listen.acl_users)'
+    replace: ';\1'
+  notify: restart_php_fpm
+
+- name: replace /etc/php-fpm.d/www.conf
+  become: yes
+  replace:
+    path: /etc/php-fpm.d/www.conf
+    regexp: '(listen.acl_users)'
+    replace: ';\1'
+  notify: restart_php_fpm
+
+- name: replace /etc/php-fpm.d/www.conf
+  become: yes
+  replace:
+    path: /etc/php-fpm.d/www.conf
+    regexp: ';(listen\.)(owner|group) = nobody'
+    replace: '\1\2 = nginx'
+  notify: restart_php_fpm
+