ubuntu20.04
This commit is contained in:
parent
af69d886e8
commit
56c8c925e2
@ -34,9 +34,7 @@
|
|||||||
- name: install packages, jessie
|
- name: install packages, jessie
|
||||||
tags: apt
|
tags: apt
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- apache2
|
- apache2
|
||||||
- libapache2-mod-php5
|
- libapache2-mod-php5
|
||||||
- mysql-client
|
- mysql-client
|
||||||
@ -46,6 +44,7 @@
|
|||||||
- php5-json
|
- php5-json
|
||||||
- php5-ldap
|
- php5-ldap
|
||||||
- php5-mysqlnd
|
- php5-mysqlnd
|
||||||
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == "Debian"
|
- ansible_distribution == "Debian"
|
||||||
- ansible_distribution_major_version == "8"
|
- ansible_distribution_major_version == "8"
|
||||||
@ -53,9 +52,7 @@
|
|||||||
- name: install packages, stretch-buster
|
- name: install packages, stretch-buster
|
||||||
tags: apt
|
tags: apt
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- apache2
|
- apache2
|
||||||
- libapache2-mod-php
|
- libapache2-mod-php
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
@ -70,6 +67,7 @@
|
|||||||
- php-soap
|
- php-soap
|
||||||
- php-xml
|
- php-xml
|
||||||
- php-zip
|
- php-zip
|
||||||
|
state: present
|
||||||
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,14 +95,12 @@
|
|||||||
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:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- apache2
|
- apache2
|
||||||
- mariadb-client
|
- mariadb-client
|
||||||
- php7.4-cli
|
- php7.4-cli
|
||||||
@ -121,9 +117,10 @@
|
|||||||
- php7.4-soap
|
- php7.4-soap
|
||||||
- php7.4-xml
|
- php7.4-xml
|
||||||
- php7.4-zip
|
- php7.4-zip
|
||||||
|
state: present
|
||||||
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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user