Make it work on debian

get rid of phpfpm listen url in favor of socket
This commit is contained in:
2024-05-17 10:43:25 +02:00
parent 4bbaa585a6
commit c8f375eebd
7 changed files with 37 additions and 14 deletions

View File

@@ -37,33 +37,50 @@
- name: create socket directory if needed
file:
path: "{{ php_fpm_listen_url|dirname }}"
path: "{{ php_fpm_listen_socket|dirname }}"
state: directory
owner: "{{ php_fpm_pool_user }}"
when: php_fpm_listen_url[0] == '/'
- name: install php-fpm
ansible.builtin.package:
name: '{{ php_fpm_package }}'
state: present
- name: install php packages
ansible.builtin.package:
name: "{{ php_packages }}"
name: "{{ php_packages }}"
state: present
- name: disable default pool
copy:
content: ""
dest: "{{ php_fpm_pool_dir }}/www.conf"
notify: restart php-fpm
- name: configure php-fpm pool 2
template:
src: www.conf
dest: "{{ php_fpm_pool_dir }}/{{ php_pool_name }}.conf"
notify: restart php-fpm
when: php_fpm_create_pool
- name: start and enable service
- name: setup apache config file
ansible.builtin.template:
src: php_apache_config.conf.jj
dest: /etc/apache2/php_fpm_{{ php_version }}_{{ php_pool_name }}.conf.inc
owner: root
group: root
mode: 0644
- name: enable service
service:
name: "{{ php_service_name }}"
enabled: yes
- name: start service
service:
name: "{{ php_service_name }}"
state: started
when: php_fpm_create_pool
- name: configure logrotate
template: