ubuntu20.04

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

View File

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