1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Explain Nextcloud's php detection + background

This commit is contained in:
A Holt 2019-07-04 19:53:49 -04:00 committed by GitHub
parent 5771aaf909
commit 5f2227c7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,12 @@
# CHECK FOR PHP VERSION AUTOMATICALLY, TO DETERMINE WHICH NEXTCLOUD TO INSTALL.
# INSPIRED BY: github.com/iiab/iiab/blob/master/roles/nodejs/tasks/main.yml#L10-L54
# NOTE: php installation is mandatory due to 0-init/tasks/main.yml, which forces
# this in roles/mysql/tasks/main.yml, as invoked by 3-base-server/tasks/main.yml
# NOTE: the 3 stanzas below would still work even if php was not installed,
# correctly setting variable 'php_new' to False.
- name: Try to run 'php -v' to get PHP version
# e.g. converts multi-line "PHP 7.0.33-0ubuntu0.16.04.5 (cli) ( NTS ) ..." to "7.0.33"
shell: php -v | head -1 | sed 's/^[^0-9.]*//' | sed 's/[^0-9.].*//'