1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/moodle/tasks/enable.yml
2019-11-28 05:26:47 -06:00

34 lines
1 KiB
YAML

- name: Create symlink 022-moodle.conf from sites-enabled to sites-available, if moodle_enabled (debuntu)
file:
src: /etc/apache2/sites-available/022-moodle.conf
dest: /etc/apache2/sites-enabled/022-moodle.conf
state: link
when: moodle_enabled and is_debuntu
- name: Remove symlink 022-moodle.conf, if not moodle_enabled (debuntu)
file:
path: /etc/apache2/sites-enabled/022-moodle.conf
state: absent
when: not moodle_enabled and is_debuntu
- name: Restart Apache service ({{ apache_service }})
systemd:
name: "{{ apache_service }}"
state: restarted
daemon-reload: yes
- name: Add 'moodle' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}"
section: moodle
option: "{{ item.option }}"
value: "{{ item.value }}"
with_items:
- option: name
value: Moodle
- option: description
value: '"Access the Moodle learning management system."'
- option: "moodle_base"
value: "{{ moodle_base }}"
- option: moodle_enabled
value: "{{ moodle_enabled }}"