Deploy moodle open-source learning platform using ansible.
Installation is adapted from official moodle docs:
- Ansible >= 2.3
All variables which can be overridden are stored in defaults/main.yml file as well as in table below.
Name | Default Value | Description |
---|---|---|
moodle_version |
3.4 |
Moodle package version |
moodle_external_url |
http://localhost:8888 |
External URL |
moodle_enable_av |
True |
Enable anti-virus |
moodle_data_dir |
/srv/moodledata |
Location of uploaded files |
moodle_db |
{} | Moodle database configuration |
moodle_admin |
{} | Moodle admin user configuration |
Use it in a playbook as follows:
- hosts: all
become: yes
roles:
- paulfantom.moodle
The preferred way of locally testing the role is to use Docker and molecule (v1.25). You will have to install Docker on your system. See Get started for a Docker package suitable to for your system. All packages you need to can be specified in one line:
pip install ansible 'ansible-lint>=3.4.15' 'molecule==1.25.0' docker 'testinfra>=1.7.0,<=1.10.1'
This should be similar to one listed in .travis.yml
file in install
section.
After installing test suit you can run test by running
molecule test
For more information about molecule go to their docs.
This project is licensed under MIT License. See LICENSE for more details.