ubuntu20.04

This commit is contained in:
ROTTLER Tamas 2022-09-07 02:41:58 +02:00
parent af69d886e8
commit 56c8c925e2

View File

@ -34,9 +34,7 @@
- name: install packages, jessie
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- apache2
- libapache2-mod-php5
- mysql-client
@ -46,6 +44,7 @@
- php5-json
- php5-ldap
- php5-mysqlnd
state: present
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "8"
@ -53,9 +52,7 @@
- name: install packages, stretch-buster
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- apache2
- libapache2-mod-php
- mariadb-client
@ -70,6 +67,7 @@
- php-soap
- php-xml
- php-zip
state: present
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 9 or ansible_distribution_major_version|int() == 10
@ -79,7 +77,7 @@
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
- ansible_distribution_major_version|int() >= 11
- name: sury repo in sources list, bullseye
tags: apt
@ -89,7 +87,7 @@
create: yes
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- ansible_distribution_major_version|int() >= 11
- name: apt update, bullseye
tags: apt
@ -97,14 +95,12 @@
update_cache: yes
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- ansible_distribution_major_version|int() >= 11
- name: install packages, bullseye
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- apache2
- mariadb-client
- php7.4-cli
@ -121,9 +117,10 @@
- php7.4-soap
- php7.4-xml
- php7.4-zip
state: present
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: conf-available
copy:
@ -143,8 +140,8 @@
- name: enable confs / modules, bullseye+
shell: "a2enconf charset log-detailed && a2enmod rewrite headers proxy_fcgi"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 11
- (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
copy:
@ -159,8 +156,8 @@
src: 000-default_fpm7.4.conf
dest: /etc/apache2/sites-available/000-default.conf
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- (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
copy:
@ -203,8 +200,8 @@
src: hws.php.ini.fpm
dest: /etc/php/7.4/hws.php.ini
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "11"
- (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:
@ -230,17 +227,17 @@
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "10"
- name: php config symlinks, bullseye
file:
state: link
src: /etc/php/7.4/hws.php.ini
path: "/etc/php/7.4/{{ item }}/conf.d/hws.php.ini"
with_items:
- fpm
- cli
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "11"
#- name: php config symlinks, bullseye
# file:
# state: link
# src: /etc/php/7.4/hws.php.ini
# path: "/etc/php/7.4/{{ item }}/conf.d/hws.php.ini"
# with_items:
# - fpm
# - cli
# when:
# - ansible_distribution == "Debian"
# - ansible_distribution_major_version == "11"
- name: php logrotate config
@ -255,8 +252,9 @@
regexp: "^ServerTokens"
line: "ServerTokens Prod"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 11
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: security.conf ServerSignature, bullseye+
tags: apt
@ -265,8 +263,8 @@
regexp: "^ServerSignature"
line: "ServerSignature Off"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 11
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
# vim: set tabstop=2 shiftwidth=2 expandtab smarttab: