mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Delete sugarizer/tasks/enable.yml
This commit is contained in:
parent
30567f5f50
commit
5718a26e68
1 changed files with 0 additions and 72 deletions
|
@ -1,72 +0,0 @@
|
||||||
# auto starts mongodb via the requires= line in unit file
|
|
||||||
- name: Enable & Restart 'sugarizer' systemd service
|
|
||||||
systemd:
|
|
||||||
name: sugarizer
|
|
||||||
daemon_reload: yes # in case mongodb.service changed, etc
|
|
||||||
enabled: yes
|
|
||||||
state: restarted
|
|
||||||
when: sugarizer_enabled | bool
|
|
||||||
|
|
||||||
# stops sugarizer but not mongodb
|
|
||||||
- name: Disable & Stop 'sugarizer' systemd service
|
|
||||||
systemd:
|
|
||||||
name: sugarizer
|
|
||||||
enabled: no
|
|
||||||
state: stopped
|
|
||||||
when: not sugarizer_enabled
|
|
||||||
|
|
||||||
# stops mongodb would of been called via meta/main.yml prior
|
|
||||||
- name: Run mongodb/tasks/enable.yml to stop MongoDB, if not sugarizer_enabled
|
|
||||||
include_tasks: roles/mongodb/tasks/enable.yml
|
|
||||||
when: not sugarizer_enabled
|
|
||||||
|
|
||||||
# Apache
|
|
||||||
|
|
||||||
- name: Enable http://box/sugarizer & http://box/sugar via Apache
|
|
||||||
command: a2ensite sugarizer.conf
|
|
||||||
when: apache_install and sugarizer_enabled
|
|
||||||
|
|
||||||
- name: Disable http://box/sugarizer & http://box/sugar via Apache
|
|
||||||
command: a2dissite sugarizer.conf
|
|
||||||
when: apache_install and not sugarizer_enabled
|
|
||||||
|
|
||||||
- name: Restart Apache systemd service ({{ apache_service }})
|
|
||||||
systemd:
|
|
||||||
name: "{{ apache_service }}"
|
|
||||||
state: restarted
|
|
||||||
when: apache_enabled | bool
|
|
||||||
|
|
||||||
# NGINX
|
|
||||||
|
|
||||||
- name: Enable http://box/sugarizer via NGINX, by installing {{ nginx_conf_dir }}/sugarizer-nginx.conf from template
|
|
||||||
template:
|
|
||||||
src: sugarizer-nginx.conf
|
|
||||||
dest: "{{ nginx_conf_dir }}/sugarizer-nginx.conf"
|
|
||||||
when: nginx_install and sugarizer_enabled
|
|
||||||
|
|
||||||
- name: Disable http://box/sugarizer via NGINX, by removing {{ nginx_conf_dir }}/sugarizer-nginx.conf
|
|
||||||
file:
|
|
||||||
path: "{{ nginx_conf_dir }}/sugarizer-nginx.conf"
|
|
||||||
state: absent
|
|
||||||
when: nginx_install and not sugarizer_enabled
|
|
||||||
|
|
||||||
- name: Restart 'nginx' systemd service
|
|
||||||
systemd:
|
|
||||||
name: nginx
|
|
||||||
state: restarted
|
|
||||||
when: nginx_enabled | bool
|
|
||||||
|
|
||||||
|
|
||||||
- name: Add 'sugarizer' variable values to {{ iiab_ini_file }}
|
|
||||||
ini_file:
|
|
||||||
path: "{{ iiab_ini_file }}"
|
|
||||||
section: sugarizer
|
|
||||||
option: "{{ item.option }}"
|
|
||||||
value: "{{ item.value | string }}"
|
|
||||||
with_items:
|
|
||||||
- option: name
|
|
||||||
value: Sugarizer
|
|
||||||
- option: description
|
|
||||||
value: '"The Sugar Learning Platform began with the famous One Laptop Per Child project, written in Python. Sugarizer is the new HTML/JavaScript implementation of Sugar, usable in most all browsers."'
|
|
||||||
- option: sugarizer_enabled
|
|
||||||
value: "{{ sugarizer_enabled }}"
|
|
Loading…
Reference in a new issue