mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #768 from holta/moodle-3.5
Moodle 3.1 -> 3.5 LTS TESTING (on Moodle's master branch for now)
This commit is contained in:
commit
b01b88464a
3 changed files with 39 additions and 25 deletions
|
@ -1,9 +1,9 @@
|
||||||
moodle_version: 31
|
moodle_version: 35
|
||||||
moodle_repo_url: "https://github.com/moodle/moodle.git"
|
#moodle_repo_url: "https://github.com/moodle/moodle.git"
|
||||||
|
moodle_repo_url: "git://git.moodle.org/moodle.git"
|
||||||
moodle_base: "{{ iiab_base }}/moodle"
|
moodle_base: "{{ iiab_base }}/moodle"
|
||||||
moodle_user: moodle
|
#moodle_user: moodle
|
||||||
moodle_install: True
|
#moodle_install: True
|
||||||
moodle_enabled: False
|
#moodle_enabled: False
|
||||||
moodle_data: '{{ content_base }}/moodle'
|
moodle_data: '{{ content_base }}/moodle'
|
||||||
moodle_database_name: moodle
|
moodle_database_name: moodle
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
- name: Install Moodle required packages (OS's other than debuntu)
|
||||||
- name: Install Moodle required packages (OS's other than debunt)
|
|
||||||
package:
|
package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
|
@ -16,10 +15,10 @@
|
||||||
- python-psycopg2
|
- python-psycopg2
|
||||||
- php{{ php_version }}-pgsql
|
- php{{ php_version }}-pgsql
|
||||||
- php{{ php_version }}-curl
|
- php{{ php_version }}-curl
|
||||||
# - php{{ php_version }}-zip
|
#- php{{ php_version }}-zip
|
||||||
- php{{ php_version }}-gd
|
- php{{ php_version }}-gd
|
||||||
# - php{{ php_version }}-mbstring
|
#- php{{ php_version }}-mbstring
|
||||||
# mbstring is now included in php-cli
|
# mbstring is now included in php-cli
|
||||||
- php{{ php_version }}-cli
|
- php{{ php_version }}-cli
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
|
@ -44,8 +43,9 @@
|
||||||
dest: "{{ moodle_base }}"
|
dest: "{{ moodle_base }}"
|
||||||
depth: 1
|
depth: 1
|
||||||
force: yes
|
force: yes
|
||||||
version: "MOODLE_{{ moodle_version }}_STABLE"
|
#version: "MOODLE_{{ moodle_version }}_STABLE"
|
||||||
# ignore_errors: yes
|
version: master # TEMPORARY DURING MAY 2018 TESTING
|
||||||
|
#ignore_errors: yes
|
||||||
when: internet_available and moodle.stat.exists is defined and not moodle.stat.exists
|
when: internet_available and moodle.stat.exists is defined and not moodle.stat.exists
|
||||||
|
|
||||||
- name: Prepare the downloaded directory so Apache can install config file
|
- name: Prepare the downloaded directory so Apache can install config file
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
mode: 0770
|
mode: 0770
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
- name: Remove stock Moodle conf
|
- name: Remove stock Moodle config file
|
||||||
file:
|
file:
|
||||||
path: "/etc/{{ apache_config_dir }}/moodle.conf"
|
path: "/etc/{{ apache_config_dir }}/moodle.conf"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
postgresql_user:
|
postgresql_user:
|
||||||
name: Admin
|
name: Admin
|
||||||
password: changeme
|
password: changeme
|
||||||
encrypted: yes # Required by PostgresSQL 10.3+ e.g. on Ubuntu 18.04, see https://github.com/iiab/iiab/issues/759
|
encrypted: yes # Required by PostgreSQL 10+ e.g. Ubuntu 18.04's PostgreSQL 10.3+, see https://github.com/iiab/iiab/issues/759
|
||||||
role_attr_flags: NOSUPERUSER,NOCREATEROLE,NOCREATEDB
|
role_attr_flags: NOSUPERUSER,NOCREATEROLE,NOCREATEDB
|
||||||
state: present
|
state: present
|
||||||
become: yes
|
become: yes
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
- name: Create database
|
- name: Create database
|
||||||
postgresql_db:
|
postgresql_db:
|
||||||
name: moodle
|
name: "{{ moodle_database_name }}"
|
||||||
encoding: utf8
|
encoding: utf8
|
||||||
owner: Admin
|
owner: Admin
|
||||||
template: template1
|
template: template1
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
- name: See if the config.php file exists
|
- name: See if config.php exists
|
||||||
stat:
|
stat:
|
||||||
path: "{{ moodle_base }}/config.php"
|
path: "{{ moodle_base }}/config.php"
|
||||||
register: config
|
register: config
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
when: config.stat.exists is defined and not config.stat.exists
|
when: config.stat.exists is defined and not config.stat.exists
|
||||||
|
|
||||||
- name: Give Apache permission to read config file
|
- name: Give Apache permission to read config file
|
||||||
# command: chown -R {{ apache_user }} {{ moodle_base }}
|
#command: chown -R {{ apache_user }} {{ moodle_base }}
|
||||||
file:
|
file:
|
||||||
path: "{{ moodle_base }}/config.php"
|
path: "{{ moodle_base }}/config.php"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
|
@ -1,8 +1,22 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
sudo -u {{ apache_user }} /usr/bin/php {{ moodle_base }}/admin/cli/install.php \
|
|
||||||
--wwwroot=http://{{ iiab_hostname }}.{{ iiab_domain }}/moodle --dataroot={{ moodle_data }} \
|
# May 2018: lowercase "--adminuser=admin" is still required for some odd
|
||||||
--dbtype=pgsql --dbname={{ moodle_database_name }} --dbuser=Admin --dbpass=changeme \
|
# reason, otherwise one cannot login to http://box.lan/moodle (with
|
||||||
--fullname=Your_School --shortname=School \
|
# Admin/changeme). At the same time --dbuser=Admin still begins with
|
||||||
--adminuser=admin --adminpass=changeme \
|
# a capital letter, in keeping with Internet-in-a-Box's other server apps?
|
||||||
--non-interactive --agree-license
|
|
||||||
chown {{ apache_user }}:{{ apache_user }} {{ moodle_base }}/config.php
|
sudo -u {{ apache_user }} \
|
||||||
|
/usr/bin/php {{ moodle_base }}/admin/cli/install.php \
|
||||||
|
--wwwroot=http://{{ iiab_hostname }}.{{ iiab_domain }}/moodle \
|
||||||
|
--dataroot={{ moodle_data }} \
|
||||||
|
--dbtype=pgsql \
|
||||||
|
--dbname={{ moodle_database_name }} \
|
||||||
|
--dbuser=Admin --dbpass=changeme \
|
||||||
|
--fullname=Your_School \
|
||||||
|
--shortname=School \
|
||||||
|
--adminuser=admin --adminpass=changeme \
|
||||||
|
--non-interactive \
|
||||||
|
--agree-license \
|
||||||
|
--allow-unstable # TEMPORARY DURING MAY 2018 TESTING
|
||||||
|
|
||||||
|
chown {{ apache_user }}:{{ apache_user }} {{ moodle_base }}/config.php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue