changeset 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 404c414506d2
children 94d62666b307
files roles/install-firewalld/tasks/main.yml roles/install-php/tasks/main.yml roles/restart-handlers/handlers/main.yml
diffstat 3 files changed, 42 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/roles/install-firewalld/tasks/main.yml	Thu Sep 03 11:20:27 2020 +0900
+++ b/roles/install-firewalld/tasks/main.yml	Thu Sep 03 12:45:12 2020 +0900
@@ -16,5 +16,4 @@
   loop:
     - http
     - https
-  changed_when: True
   notify: restart_firewalld
--- 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
+
--- a/roles/restart-handlers/handlers/main.yml	Thu Sep 03 11:20:27 2020 +0900
+++ b/roles/restart-handlers/handlers/main.yml	Thu Sep 03 12:45:12 2020 +0900
@@ -23,4 +23,6 @@
     name: php-fpm
     state: restarted
     daemon_reload: yes
-    enbaled: yes
+    enabled: yes
+
+