Skip to content

Commit

Permalink
Merge pull request #2447 from holta/moodle-3.9.x
Browse files Browse the repository at this point in the history
Moodle 3.9.x LTS for IIAB 7.2 (installs libapache2-mod-php{{ php_version }} within httpd/tasks/install.yml for now)
  • Loading branch information
holta committed Jun 18, 2020
2 parents 17253d4 + 9e3a546 commit e763670
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
11 changes: 6 additions & 5 deletions roles/elgg/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
include_role:
name: httpd

# 2020-05-21: Required now that mysql/tasks/install.yml installs
# "php{{ php_version }}-common" rather than the full "php{{ php_version }}"
- name: "Install package: libapache2-mod-php{{ php_version }}"
package:
name: "libapache2-mod-php{{ php_version }}"
# 2020-06-15: roles/httpd/tasks/install.yml now takes care of this.
# # 2020-05-21: Required now that mysql/tasks/install.yml installs
# # "php{{ php_version }}-common" rather than the full "php{{ php_version }}"
# - name: "Install package: libapache2-mod-php{{ php_version }}"
# package:
# name: "libapache2-mod-php{{ php_version }}"

# Assume (enforce?) MySQL is running
#
Expand Down
26 changes: 14 additions & 12 deletions roles/httpd/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
- name: 'Install 3 packages: apache2, php{{ php_version }}, php{{ php_version }}-curl (debian)'
- name: 'Install 4 packages: apache2, libapache2-mod-php{{ php_version }}, php{{ php_version }}, php{{ php_version }}-curl'
package:
#name: [u'apache2', u'php{{ php_version }}', u'php{{ php_version }}-curl'] # FAILS ('u' for Unicode strings)
#name: ['apache2', 'php{{ php_version }}', 'php{{ php_version }}-curl'] # WORKS?
name:
- "{{ apache_service }}" # apache2 on Debuntu
- "libapache2-mod-php{{ php_version }}" # 2020-06-15: Required (e.g. for Elgg, Moodle & possibly others) now that mysql/tasks/install.yml installs "php{{ php_version }}-common" rather than the full "php{{ php_version }}"
- "php{{ php_version }}"
- "php{{ php_version }}-curl"
state: present
when: is_debian | bool

- name: 'Install 2 packages: apache2, php (ubuntu)'
package:
#name: [u'apache2', u'php'] # FAILS ('u' for Unicode strings)
#name: ['apache2', 'php'] # WORKS
name:
- "{{ apache_service }}" # apache2 on Debuntu
- php
state: present
when: is_ubuntu | bool
when: is_debuntu | bool
# when: is_debian | bool

# - name: 'Install 2 packages: apache2, php (ubuntu)'
# package:
# #name: [u'apache2', u'php'] # FAILS ('u' for Unicode strings)
# #name: ['apache2', 'php'] # WORKS
# name:
# - "{{ apache_service }}" # apache2 on Debuntu
# - php
# state: present
# when: is_ubuntu | bool

# 2019-05-30: It's interesting that http://box.lan/admin and everything seems
# to work even without php{{ php_version }}-sqlite3 as confirmed on Ubuntu
Expand Down
2 changes: 1 addition & 1 deletion roles/moodle/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

moodle_version: 38
moodle_version: 39
#moodle_repo_url: "https://github.com/moodle/moodle.git"
moodle_repo_url: "git://git.moodle.org/moodle.git"
moodle_base: "{{ iiab_base }}/moodle" # /opt/iiab
Expand Down
29 changes: 14 additions & 15 deletions roles/moodle/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,30 @@
name: postgresql


- name: "Install packages: python-psycopg2, php-pgsql (OS's other than debuntu)"
package:
name:
- python-psycopg2
- php-pgsql
state: present
when: not is_debuntu
# - name: "Install packages: python-psycopg2, php-pgsql (OS's other than debuntu)"
# package:
# name:
# - python-psycopg2
# - php-pgsql
# state: present
# when: not is_debuntu

- name: Install 4 php packages (debuntu)
package:
name:
- php{{ php_version }}-pgsql
- php{{ php_version }}-curl
#- php{{ php_version }}-zip
- php{{ php_version }}-zip
- php{{ php_version }}-gd
#- php{{ php_version }}-mbstring
# mbstring is now included in php-cli
- php{{ php_version }}-cli
- php{{ php_version }}-mbstring # 2020-06-15: Now required by Moodle 3.9+
- php{{ php_version }}-cli # 2020-06-15: In the past this included (above) mbstring? However this is not true on Ubuntu Server 20.04 LTS.
state: present
when: is_debuntu | bool

- name: "Install package: php{{ php_version }}-zip (Ubuntu or Debian 9+)"
package:
name: "php{{ php_version }}-zip"
when: is_ubuntu or (is_debian and not is_debian_8)
# - name: "Install package: php{{ php_version }}-zip (Ubuntu or Debian 9+)"
# package:
# name: "php{{ php_version }}-zip"
# when: is_ubuntu or (is_debian and not is_debian_8)

# - name: "Install package: php-pclzip (debian-8)"
# package:
Expand Down

0 comments on commit e763670

Please sign in to comment.