auto update

This commit is contained in:
Dryusdan 2024-03-01 13:24:01 +01:00
parent 2fcf31e709
commit 860a34f4fb
2 changed files with 7 additions and 38 deletions

View file

@ -1,38 +1,5 @@
---
- name: "Install Sury"
block:
- name: "Display distrib version"
ansible.builtin.debug:
msg: "{{ ansible_distribution_major_version }}"
- name: Add Sury repo on Stretch
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ stretch main"
state: present
filename: php-sury
when: ansible_distribution_major_version == '9'
- name: Add Sury repo on Buster
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ buster main"
state: present
filename: php-sury
when: ansible_distribution_major_version == '10'
- name: Add Sury repo on Bullseye
ansible.builtin.apt_repository:
repo: "deb https://packages.sury.org/php/ bullseye main"
state: present
filename: php-sury
when: ansible_distribution_major_version == '11'
- name: Add Sury apt signing key
ansible.builtin.apt_key:
url: https://packages.sury.org/php/apt.gpg
state: present
when: phpsury is defined and phpsury == True
- name: PHP already installed ?
shell: "dpkg-query -W 'php{{ php_version }}-fpm'"
ignore_errors: true
@ -53,13 +20,14 @@
- php-cli
- php-common
- php-fpm
- php-geoip
#- php-geoip
- php-gmp
- php-json-schema
- php-mysql
- php-pear
- php-pgsql
- php-zip
- php-bz2
- php-bcmath
- php-cli
- php-common
@ -80,5 +48,5 @@
- php-xml
- php-zip
- composer
# when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
when: php is failed

View file

@ -3,7 +3,7 @@
listen = {{ item.socket }}
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
;listen.mode = 0660
user = {{ item.user }}
group = {{ item.group }}
@ -17,6 +17,8 @@ pm.max_spare_servers = {{ item.max_spare_servers | default('1') }}
pm.max_requests = {{ item.max_requests | default('0') }}
pm.status_path = /status
catch_workers_output = {{ item.catch_workers_output | default("yes") }}
{% if item.chdir is defined %}
chdir = {{ item.chdir }}
{% endif %}
@ -33,7 +35,6 @@ env[TMPDIR] = {{ item.tmpdir }}
env[TEMP] = {{ item.tmpdir }}
{% endif %}
php_flag[asp_tags] = {{ item.asp_tags | default('Off') }}
php_flag[display_errors] = {{ item.display_errors | default('Off') }}
php_flag[display_startup_errors] = {{ item.display_startup_errors | default('Off') }}
php_flag[session.use_cookies] = {{ item.session_use_cookies | default('1') }}
@ -55,7 +56,7 @@ php_value[session.cookie_lifetime] = 0
php_value[session.cookie_path] = /
php_value[session.name] = DRYCOOKIE_MIAM
php_value[session.serialize_handler] = php
php_value[upload_max_filesize] = {{ item.upload_max_filesize | default('32')}}
php_value[upload_max_filesize] = {{ item.upload_max_filesize | default('8M')}}
php_admin_flag[allow_url_fopen] = {{ item.allow_url_fopen | default('Off') }}
php_admin_flag[allow_url_include] = {{ item.allow_url_include | default('Off') }}