debian 12
This commit is contained in:
parent
fd33efd0cb
commit
c4197a5111
@ -87,9 +87,19 @@
|
||||
create: yes
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version|int() >= 11
|
||||
- ansible_distribution_major_version|int() == 11
|
||||
|
||||
- name: apt update, bullseye
|
||||
- name: sury repo in sources list, bookworm
|
||||
tags: apt
|
||||
lineinfile:
|
||||
dest: /etc/apt/sources.list.d/php-sury.list
|
||||
line: 'deb https://packages.sury.org/php/ bookworm main'
|
||||
create: yes
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version|int() >= 12
|
||||
|
||||
- name: apt update, bullseye+
|
||||
tags: apt
|
||||
apt:
|
||||
update_cache: yes
|
||||
@ -97,30 +107,59 @@
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version|int() >= 11
|
||||
|
||||
- name: install packages, bullseye
|
||||
- name: set phpver for debian bullseye
|
||||
set_fact:
|
||||
phpver: "7.4"
|
||||
when:
|
||||
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() == 11) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
|
||||
|
||||
- name: set phpver for debian bookworm+
|
||||
set_fact:
|
||||
phpver: "8.2"
|
||||
when:
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version|int() >= 12
|
||||
|
||||
- name: install packages, bullseye+
|
||||
tags: apt
|
||||
apt:
|
||||
name:
|
||||
- apache2
|
||||
- mariadb-client
|
||||
- php7.4-cli
|
||||
- php7.4-fpm
|
||||
- php7.4-bcmath
|
||||
- php7.4-curl
|
||||
- php7.4-gd
|
||||
- php7.4-json
|
||||
- php7.4-ldap
|
||||
- php7.4-mbstring
|
||||
- php7.4-mysql
|
||||
- php7.4-opcache
|
||||
- php7.4-readline
|
||||
- php7.4-soap
|
||||
- php7.4-xml
|
||||
- php7.4-zip
|
||||
- "php{{ phpver }}-cli"
|
||||
- "php{{ phpver }}-fpm"
|
||||
- "php{{ phpver }}-bcmath"
|
||||
- "php{{ phpver }}-curl"
|
||||
- "php{{ phpver }}-gd"
|
||||
- "php{{ phpver }}-ldap"
|
||||
- "php{{ phpver }}-mbstring"
|
||||
- "php{{ phpver }}-mysql"
|
||||
- "php{{ phpver }}-opcache"
|
||||
- "php{{ phpver }}-readline"
|
||||
- "php{{ phpver }}-soap"
|
||||
- "php{{ phpver }}-xml"
|
||||
- "php{{ phpver }}-zip"
|
||||
state: present
|
||||
when:
|
||||
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
|
||||
- phpver is defined
|
||||
|
||||
- name: install packages, bullseye+
|
||||
tags: apt
|
||||
apt:
|
||||
name:
|
||||
- "php{{ phpver }}-json"
|
||||
state: present
|
||||
when:
|
||||
- phpver is defined
|
||||
- phpver == "7.4"
|
||||
|
||||
- name: php fpm/pool.d/www.conf, bullseye+
|
||||
template:
|
||||
src: pool_www.conf
|
||||
dest: "/etc/php/{{ phpver }}/fpm/pool.d/www.conf"
|
||||
when:
|
||||
- phpver is defined
|
||||
|
||||
- name: conf-available
|
||||
copy:
|
||||
@ -151,9 +190,9 @@
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version|int() < 11
|
||||
|
||||
- name: virtualhost config, bullseye
|
||||
copy:
|
||||
src: 000-default_fpm7.4.conf
|
||||
- name: virtualhost config, bullseye+
|
||||
template:
|
||||
src: 000-default_fpm.conf
|
||||
dest: /etc/apache2/sites-available/000-default.conf
|
||||
when:
|
||||
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
|
||||
@ -195,13 +234,13 @@
|
||||
- ansible_distribution == "Debian"
|
||||
- ansible_distribution_major_version == "10"
|
||||
|
||||
- name: php config, bullseye
|
||||
copy:
|
||||
src: hws.php.ini.fpm
|
||||
dest: /etc/php/7.4/hws.php.ini
|
||||
when:
|
||||
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
|
||||
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
|
||||
#- name: php config, bullseye
|
||||
# copy:
|
||||
# src: hws.php.ini.fpm
|
||||
# dest: /etc/php/7.4/hws.php.ini
|
||||
# when:
|
||||
# - (ansible_distribution == "Debian" and ansible_distribution_major_version|int() == 11) or
|
||||
# (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
|
||||
|
||||
- name: php config symlinks, stretch
|
||||
file:
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Files "*.php">
|
||||
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
|
||||
SetHandler "proxy:unix:/run/php/php{{ phpver }}-fpm.sock|fcgi://localhost"
|
||||
</Files>
|
||||
</VirtualHost>
|
||||
|
||||
15
templates/pool_www.conf
Normal file
15
templates/pool_www.conf
Normal file
@ -0,0 +1,15 @@
|
||||
[www]
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = /run/php/php{{ phpver }}-fpm.sock
|
||||
listen.owner = www-data
|
||||
listen.group = www-data
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
|
||||
php_admin_value[user_ini.filename] = .php.ini
|
||||
php_admin_value[user_ini.cache_ttl] = 60
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user