when:internet_available and nextcloud_force_install and php_new
#when: internet_available and nextcloud_force_install and not (is_debian_9 or is_raspbian_9 or is_ubuntu_16)
# Ubuntu and Debian treat names differently
- name:Install 3 php packages (debian)
package:
name:
- "libapache2-mod-php{{ php_version }}"
- "php{{ php_version }}-mbstring"
- "php{{ php_version }}-zip"
state:present
when:is_debian | bool
# Ubuntu and Debian treat names differently
- name:Install 4 php packages (ubuntu)
package:
name:
- libapache2-mod-php
- php-imagick
- php-zip
- php-mbstring
state:present
when:is_ubuntu | bool
- name:Install 5 more php packages (debuntu)
package:
name:
- "php{{ php_version }}-gd"
- "php{{ php_version }}-json"
- "php{{ php_version }}-mysql"
- "php{{ php_version }}-curl"
- "php{{ php_version }}-intl"
state:present
when:is_debuntu | bool
- name:'Install php{{ php_version }}-mcrypt IF this is a "pre-2018" distro in the debuntu family. NOTE: PHP 7.1 deprecated mcrypt 1-Dec-2016 and PHP 7.2 dropped it completely 30-Nov-2017, as it should no longer be nec.'
package:
name:"php{{ php_version }}-mcrypt"
state:present
when:is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
# NOT NEC TO TEST FOR is_raspbian_8 OR is_raspbian_9 AS /opt/iiab/iiab/vars/<OS>.yml
# DEFINES THESE AS SUBSETS OF is_debian_8 OR is_debian_9 (FOR NOW!)
# we need to install the rpm in order to get the dependencies
# but we only need to do this the first time
- name:Install 7 php packages (redhat)
package:
name:
- php
- php-gd
- php-json
- php-mysql
- php-curl
- php-intl
- php-mcrypt
# CentOS does not have a package for php-imagick
#- php-imagick
state:present
when:is_redhat | bool
- name:Unarchive {{ nextcloud_src_file_old }} to permanent location {{ nextcloud_prefix }}/nextcloud on older OS's lacking PHP 7.1+ # i.e. unpack nextcloud_latest-15.tar.bz2 to /opt/nextcloud
#when: nextcloud_force_install and (is_debian_9 or is_raspbian_9 or is_ubuntu_16)
- name:Unarchive {{ nextcloud_src_file }} to permanent location {{ nextcloud_prefix }}/nextcloud on newer OS's that have PHP 7.1+ # i.e. unpack nextcloud_latest-16.tar.bz2 to /opt/nextcloud