Compare commits

...

2 Commits

Author SHA1 Message Date
0648224abe Merge remote-tracking branch 'origin/master' 2024-12-17 22:04:09 +01:00
cb557bc52e task name javitasok, phpver 2024-12-17 22:04:02 +01:00

View File

@ -31,7 +31,7 @@
- name: www index.html
shell: "test -e /var/www/def/public/index.html || hostname > /var/www/def/public/index.html"
- name: install packages, jessie
- name: install packages, debian8
tags: apt
apt:
name:
@ -49,7 +49,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "8"
- name: install packages, stretch-buster
- name: install packages, debian9-10
tags: apt
apt:
name:
@ -72,14 +72,14 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 9 or ansible_distribution_major_version|int() == 10
- name: sury repo pgp key, bullseye+
- name: sury repo pgp key, debian11-99
tags: apt
shell: "curl {{ (proxy is defined) | ternary('--proxy '+ proxy|default(''), '')}} -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 11
- name: sury repo in sources list, bullseye
- name: sury repo in sources list, debian11
tags: apt
lineinfile:
dest: /etc/apt/sources.list.d/php-sury.list
@ -89,7 +89,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- name: sury repo in sources list, bookworm
- name: sury repo in sources list, debian12
tags: apt
lineinfile:
dest: /etc/apt/sources.list.d/php-sury.list
@ -97,9 +97,9 @@
create: yes
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 12
- ansible_distribution_major_version|int() == 12
- name: apt update, bullseye+
- name: apt update, debian11-99
tags: apt
apt:
update_cache: yes
@ -107,21 +107,38 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 11
- name: set phpver for debian bullseye
- name: set phpver for debian11 ubuntu20
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)
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 12
- name: set phpver for debian bookworm+
- name: set phpver for debian debian12
set_fact:
phpver: "8.2"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 12
- ansible_distribution_major_version|int() == 12
- name: install packages, bullseye+
- name: set phpver for ubuntu20
set_fact:
phpver: "7.4"
# default, ubuntuba nem teszunk sury repot
when:
- ansible_distribution == "Ubuntu"
- ansible_distribution_major_version|int() == 20
- name: set phpver for debian ubuntu22
set_fact:
phpver: "8.1"
# default, ubuntuba nem teszunk sury repot
when:
- ansible_distribution == "Ubuntu"
- ansible_distribution_major_version|int() == 22
- name: install packages [phpver]
tags: apt
apt:
name:
@ -146,7 +163,7 @@
when:
- phpver is defined
- name: install packages, bullseye+
- name: install json for php7.4 [phpver]
tags: apt
apt:
name:
@ -156,7 +173,7 @@
- phpver is defined
- phpver == "7.4"
- name: php fpm/pool.d/www.conf, bullseye+
- name: php fpm/pool.d/www.conf [phpver]
template:
src: pool_www.conf
dest: "/etc/php/{{ phpver }}/fpm/pool.d/www.conf"
@ -172,19 +189,19 @@
- charset.conf
- log-detailed.conf
- name: enable confs / modules, -buster
- name: enable confs / modules, debian0-10
shell: "a2enconf charset log-detailed && a2enmod rewrite"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() < 11
- name: enable confs / modules, bullseye+
- name: enable confs / modules, debian11-99 ubuntu20-99
shell: "a2enconf charset log-detailed && a2enmod rewrite headers proxy_fcgi"
when:
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: virtualhost config, -buster
- name: virtualhost config, debian0-10
copy:
src: 000-default_modphp.conf
dest: /etc/apache2/sites-available/000-default.conf
@ -192,7 +209,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() < 11
- name: virtualhost config, bullseye+
- name: virtualhost config, debian11-99 ubuntu20-99
template:
src: 000-default_fpm.conf
dest: /etc/apache2/sites-available/000-default.conf
@ -200,7 +217,7 @@
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: php config, jessie
- name: php config, debian8
copy:
src: hws.php.ini.modphp
dest: /etc/php5
@ -208,7 +225,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "8"
- name: php config symlinks, jessie
- name: php config symlinks, debian8
file:
state: link
src: /etc/php5/hws.php.ini
@ -220,7 +237,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "8"
- name: php config, stretch
- name: php config, debian9
copy:
src: hws.php.ini.modphp
dest: /etc/php/7.0/hws.php.ini
@ -228,7 +245,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "9"
- name: php config, buster
- name: php config, debian10
copy:
src: hws.php.ini.modphp
dest: /etc/php/7.3/hws.php.ini
@ -244,7 +261,7 @@
# - (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
- name: php config symlinks, debian9
file:
state: link
src: /etc/php/7.0/hws.php.ini
@ -256,7 +273,7 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "9"
- name: php config symlinks, buster
- name: php config symlinks, debian10
file:
state: link
src: /etc/php/7.3/hws.php.ini
@ -286,7 +303,7 @@
src: logrotate.conf
dest: /etc/logrotate.d/php
- name: security.conf ServerTokens, bullseye+
- name: security.conf ServerTokens, debian11-99 ubuntu20-99
tags: apt
lineinfile:
dest: /etc/apache2/conf-available/security.conf
@ -297,7 +314,7 @@
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: security.conf ServerSignature, bullseye+
- name: security.conf ServerSignature, debian11-99 ubuntu20-99
tags: apt
lineinfile:
dest: /etc/apache2/conf-available/security.conf