Swith to buster for PHP 7.3
- Amend lxc role default variable examples to include buster - Include opensmtpd configuration to replace ssmtp into the container - Delete Sury related tasks - Change packages names when installing php in the php73 container since we are not using Sury anymore
This commit is contained in:
parent
aa059df446
commit
f70be6d0df
|
@ -7,3 +7,6 @@
|
||||||
|
|
||||||
- name: Reload php73-fpm
|
- name: Reload php73-fpm
|
||||||
command: "lxc-attach -n php73 -- systemctl reload php7.3-fpm"
|
command: "lxc-attach -n php73 -- systemctl reload php7.3-fpm"
|
||||||
|
|
||||||
|
- name: Restart opensmtpd
|
||||||
|
command: "lxc-attach -n php73 -- systemctl restart opensmtpd"
|
||||||
|
|
|
@ -23,27 +23,8 @@
|
||||||
command: "lxc-attach -n {{name}} -- apt-get update"
|
command: "lxc-attach -n {{name}} -- apt-get update"
|
||||||
when: name == 'php73'
|
when: name == 'php73'
|
||||||
|
|
||||||
- name: Install requirements for sury repository
|
|
||||||
command: "lxc-attach -n {{name}} -- apt-get install -y --no-install-recommends wget apt-transport-https ca-certificates gnupg"
|
|
||||||
when: name == 'php73'
|
|
||||||
|
|
||||||
- name: Add sury APT repository
|
|
||||||
copy:
|
|
||||||
content: "deb https://packages.sury.org/php/ stretch main"
|
|
||||||
dest: "/var/lib/lxc/{{name}}/rootfs/etc/apt/sources.list.d/sury.list"
|
|
||||||
mode: "0644"
|
|
||||||
when: name == 'php73'
|
|
||||||
|
|
||||||
- name: Add sury GPG key
|
|
||||||
shell: "wget -O- https://packages.sury.org/php/apt.gpg |lxc-attach -n {{name}} -- apt-key add -"
|
|
||||||
when: name == 'php73'
|
|
||||||
|
|
||||||
- name: Update APT cache
|
|
||||||
command: "lxc-attach -n {{name}} -- apt-get update"
|
|
||||||
when: name == 'php73'
|
|
||||||
|
|
||||||
- name: Install PHP packages
|
- name: Install PHP packages
|
||||||
command: "lxc-attach -n {{name}} -- apt-get install -y php7.3 php7.3-fpm php7.3-cli php7.3-curl php7.3-mysql php7.3-pgsql php7.3-ldap php7.3-imap php7.3-gd php-ssh2 php-gettext composer libphp-phpmailer ssmtp git zip unzip php7.3-zip"
|
command: "lxc-attach -n {{name}} -- apt-get install -y php-fpm php-cli php-gd php-intl php-imap php-ldap php-mysql php-pgsql php-gettext php-curl php-ssh2 composer libphp-phpmailer opensmtpd git zip unzip php-zip"
|
||||||
when: name == 'php73'
|
when: name == 'php73'
|
||||||
|
|
||||||
- name: Copy evolinux PHP 5.6 configuration
|
- name: Copy evolinux PHP 5.6 configuration
|
||||||
|
@ -90,18 +71,29 @@
|
||||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
||||||
regexp: "^mailhub=.*$"
|
regexp: "^mailhub=.*$"
|
||||||
replace: "mailhub=127.0.0.1"
|
replace: "mailhub=127.0.0.1"
|
||||||
|
when: name != 'php73'
|
||||||
|
|
||||||
- name: Configure ssmtp
|
- name: Configure ssmtp
|
||||||
replace:
|
replace:
|
||||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
||||||
regexp: "^#FromLineOverride=.*$"
|
regexp: "^#FromLineOverride=.*$"
|
||||||
replace: "FromLineOverride=YES"
|
replace: "FromLineOverride=YES"
|
||||||
|
when: name != 'php73'
|
||||||
|
|
||||||
- name: Configure ssmtp
|
- name: Configure ssmtp
|
||||||
replace:
|
replace:
|
||||||
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
name: "/var/lib/lxc/{{name}}/rootfs/etc/ssmtp/ssmtp.conf"
|
||||||
regexp: "^hostname=.*"
|
regexp: "^hostname=.*"
|
||||||
replace: "hostname={{ansible_fqdn}}"
|
replace: "hostname={{ansible_fqdn}}"
|
||||||
|
when: name != 'php73'
|
||||||
|
|
||||||
|
- name: Configure opensmtpd
|
||||||
|
replace:
|
||||||
|
name: "/var/lib/lxc/{{name}}/rootfs/etc/smtpd.conf"
|
||||||
|
regexp: "^listen.*"
|
||||||
|
replace: "#listen on localhost"
|
||||||
|
notify: "Restart opensmtpd"
|
||||||
|
when: name == 'php73'
|
||||||
|
|
||||||
- name: Configure timezone
|
- name: Configure timezone
|
||||||
copy:
|
copy:
|
||||||
|
|
|
@ -15,4 +15,6 @@ lxc_mount_part: "/home"
|
||||||
# release: jessie
|
# release: jessie
|
||||||
# - name: php70
|
# - name: php70
|
||||||
# release: stretch
|
# release: stretch
|
||||||
|
# - name: php73
|
||||||
|
# release: buster
|
||||||
lxc_containers: []
|
lxc_containers: []
|
||||||
|
|
Loading…
Reference in a new issue