File tree Expand file tree Collapse file tree 6 files changed +16
-7
lines changed Expand file tree Collapse file tree 6 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,18 @@ jobs:
5959 name : Molecule
6060 runs-on : ubuntu-22.04
6161 strategy :
62- max-parallel : 4
6362 matrix :
6463 molecule-scenario :
6564 - default
6665 - mariadb
6766 ubuntu-version :
6867 - ubuntu2004
6968 - ubuntu2204
69+ moodle-version :
70+ - MOODLE_39_STABLE
71+ - MOODLE_400_STABLE
72+ - MOODLE_401_STABLE
73+ - MOODLE_402_STABLE
7074
7175 steps :
7276 - name : Check out the codebase.
8892 PY_COLORS : " 1"
8993 ANSIBLE_FORCE_COLOR : " 1"
9094 MOLECULE_DISTRO : ${{ matrix.ubuntu-version }}
95+ MOLECULE_MOODLE_VERSION : ${{ matrix.moodle-version }}
Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ provisioner:
3737 host_vars :
3838 ansible_role_moodle_molecule_${MOLECULE_DISTRO:-ubuntu2204} :
3939 ansible_user : ubuntu
40+ moodle_deploy_version : ${MOLECULE_MOODLE_VERSION:-MOODLE_402_STABLE}
4041verifier :
4142 name : ansible
Original file line number Diff line number Diff line change @@ -35,5 +35,6 @@ provisioner:
3535 host_vars :
3636 ansible_role_moodle_molecule_${MOLECULE_DISTRO:-ubuntu2204} :
3737 ansible_user : ubuntu
38+ moodle_deploy_version : ${MOLECULE_MOODLE_VERSION:-MOODLE_402_STABLE}
3839verifier :
3940 name : ansible
Original file line number Diff line number Diff line change 6565 - --adminuser={{ moodle_admin_username }}
6666 - --adminpass={{ moodle_admin_password }}
6767 - --adminemail={{ moodle_admin_email }}
68- - --supportemail={{ moodle_support_email }}
68+ - " {{ (moodle_deploy_version == 'MOODLE_311_STABLE' or moodle_deploy_version == 'MOODLE_400_STABLE') | ternary(omit, ' --supportemail=' + moodle_support_email) }}"
6969 ansible.builtin.command :
7070 chdir : " {{ moodle_deploy_destination }}"
7171 argv : " {{ command_args | reject('equalto', omit) | list }}"
Original file line number Diff line number Diff line change 2020# @copyright 2023 Geoffrey Bernardo van Wyk (https://geoffreyvanwyk.dev)
2121# #
2222
23+ - name : Set PHP version
24+ ansible.builtin.set_fact :
25+ php_version : " {{
26+ '8.1' if (moodle_deploy_version == 'MOODLE_402_STABLE') or (moodle_deploy_version == 'MOODLE_401_STABLE')
27+ else '8.0' if (moodle_deploy_version == 'MOODLE_400_STABLE') or (moodle_deploy_version == 'MOODLE_311_STABLE')
28+ else '7.4' }}"
29+
2330- name : Install PHP
2431 ansible.builtin.include_role :
2532 name : geoffreyvanwyk.php
Original file line number Diff line number Diff line change 2121# @see Understanding Variable Precedence {@link https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#understanding-variable-precedence}
2222# #
2323
24- php_version : " {{
25- '8.1' if (moodle_deploy_version == 'MOODLE_402_STABLE') or (moodle_deploy_version == 'MOODLE_401_STABLE')
26- else '8.0' if (moodle_deploy_version == 'MOODLE_400_STABLE') or (moodle_deploy_version == 'MOODLE_311_STABLE')
27- else '7.4' }}"
28-
2924moodle_instance : " {{ moodle_web_domain + ('' if moodle_web_path == '' else '-' + moodle_web_path) }}"
3025
3126moodle_cfg_wwwroot : " {{ moodle_web_protocol }}://{{ moodle_web_domain }}/{{ moodle_web_path }}"
You can’t perform that action at this time.
0 commit comments