mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
moodle/tasks/enable.yml & WordPress tweaks
This commit is contained in:
parent
a4d898dd9c
commit
ce2ea1990e
2 changed files with 36 additions and 18 deletions
|
@ -1,21 +1,39 @@
|
||||||
- name: Create symlink 022-moodle.conf from sites-enabled to sites-available, if moodle_enabled (debuntu)
|
# Apache
|
||||||
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)
|
- name: Enable http://box/moodle via Apache
|
||||||
file:
|
command: a2ensite 022-moodle.conf
|
||||||
path: /etc/apache2/sites-enabled/022-moodle.conf
|
when: apache_install and moodle_enabled
|
||||||
state: absent
|
|
||||||
when: not moodle_enabled and is_debuntu
|
|
||||||
|
|
||||||
- name: Restart Apache service ({{ apache_service }})
|
- name: Disable http://box/moodle via Apache
|
||||||
|
command: a2dissite 022-moodle.conf
|
||||||
|
when: apache_install and not moodle_enabled
|
||||||
|
|
||||||
|
- name: Restart Apache systemd service ({{ apache_service }})
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}" # apache2 or httpd, as set in /opt/iiab/iiab/vars/<OS>.yml
|
||||||
state: restarted
|
state: restarted
|
||||||
daemon-reload: yes
|
when: apache_enabled | bool
|
||||||
|
|
||||||
|
# NGINX
|
||||||
|
|
||||||
|
- name: Enable http://box/moodle via NGINX, by installing {{ nginx_config_dir }}/moodle-nginx.conf from template
|
||||||
|
template:
|
||||||
|
src: moodle-nginx.conf.j2
|
||||||
|
dest: "{{ nginx_config_dir }}/moodle-nginx.conf"
|
||||||
|
when: nginx_install and moodle_enabled
|
||||||
|
|
||||||
|
- name: Disable http://box/moodle via NGINX, by removing {{ nginx_config_dir }}/moodle-nginx.conf
|
||||||
|
file:
|
||||||
|
path: "{{ nginx_config_dir }}/moodle-nginx.conf"
|
||||||
|
state: absent
|
||||||
|
when: nginx_install and not moodle_enabled
|
||||||
|
|
||||||
|
- name: Restart 'nginx' systemd service
|
||||||
|
systemd:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
||||||
|
when: nginx_enabled | bool
|
||||||
|
|
||||||
|
|
||||||
- name: Add 'moodle' variable values to {{ iiab_ini_file }}
|
- name: Add 'moodle' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Apache
|
# Apache
|
||||||
|
|
||||||
- name: "Enable http://box{{ wp_url }} via Apache"
|
- name: Enable http://box{{ wp_url }} via Apache
|
||||||
command: a2ensite wordpress.conf
|
command: a2ensite wordpress.conf
|
||||||
when: apache_install and wordpress_enabled
|
when: apache_install and wordpress_enabled
|
||||||
|
|
||||||
- name: "Disable http://box{{ wp_url }} via Apache"
|
- name: Disable http://box{{ wp_url }} via Apache
|
||||||
command: a2dissite wordpress.conf
|
command: a2dissite wordpress.conf
|
||||||
when: apache_install and not wordpress_enabled
|
when: apache_install and not wordpress_enabled
|
||||||
|
|
||||||
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
# NGINX
|
# NGINX
|
||||||
|
|
||||||
- name: "Enable http://box{{ wp_url }} via NGINX, by installing {{ nginx_config_dir }}/wordpress-nginx.conf from template"
|
- name: Enable http://box{{ wp_url }} via NGINX, by installing {{ nginx_config_dir }}/wordpress-nginx.conf from template
|
||||||
template:
|
template:
|
||||||
src: wordpress-nginx.conf.j2
|
src: wordpress-nginx.conf.j2
|
||||||
dest: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
dest: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
||||||
when: nginx_install and wordpress_enabled
|
when: nginx_install and wordpress_enabled
|
||||||
|
|
||||||
- name: "Disable http://box{{ wp_url }} via NGINX, by removing {{ nginx_config_dir }}/wordpress-nginx.conf"
|
- name: Disable http://box{{ wp_url }} via NGINX, by removing {{ nginx_config_dir }}/wordpress-nginx.conf
|
||||||
file:
|
file:
|
||||||
path: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
path: "{{ nginx_config_dir }}/wordpress-nginx.conf"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue