mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
got through runrole
This commit is contained in:
parent
09f4fe6021
commit
2c4d81ff76
3 changed files with 47 additions and 7 deletions
|
@ -2,4 +2,5 @@ sugarizer_install: True
|
||||||
sugarizer_enabled: False
|
sugarizer_enabled: False
|
||||||
sugarizer_location: '{{ doc_root }}'
|
sugarizer_location: '{{ doc_root }}'
|
||||||
sugarizer_version: 'sugarizer-1.0'
|
sugarizer_version: 'sugarizer-1.0'
|
||||||
|
sugarizer_server_version: 'sugarizer-server-1.0'
|
||||||
npm_exists: False
|
npm_exists: False
|
||||||
|
|
|
@ -13,12 +13,35 @@
|
||||||
# command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
# command: tar xzf {{ downloads_dir }}/{{ sugarizer_version }}.tar.gz -C {{ sugarizer_location }}
|
||||||
# creates="{{ sugarizer_location }}/{{ sugarizer_version }}/index.html"
|
# creates="{{ sugarizer_location }}/{{ sugarizer_version }}/index.html"
|
||||||
|
|
||||||
|
- name: Download latest stable Server from location we control
|
||||||
|
get_url:
|
||||||
|
url: "{{ iiab_download_url }}/{{ sugarizer_server_version }}.tar.gz"
|
||||||
|
dest: "{{ downloads_dir }}/{{ sugarizer_server_version }}.tar.gz"
|
||||||
|
timeout: "{{ download_timeout }}"
|
||||||
|
when: internet_available
|
||||||
|
|
||||||
|
- name: Untar to /library/www/html/{{ sugarizer_version }}
|
||||||
|
unarchive:
|
||||||
|
src: "{{ downloads_dir }}/{{ sugarizer_version }}.tar.gz"
|
||||||
|
dest: "{{ sugarizer_location }}"
|
||||||
|
creates: "{{ sugarizer_location }}/{{ sugarizer_version }}/index.html"
|
||||||
- name: Create symbolic link /library/www/html/sugarizer
|
- name: Create symbolic link /library/www/html/sugarizer
|
||||||
file:
|
file:
|
||||||
src: "{{ sugarizer_location }}/{{ sugarizer_version }}"
|
src: "{{ sugarizer_location }}/{{ sugarizer_version }}"
|
||||||
dest: "{{ sugarizer_location }}/sugarizer"
|
dest: "{{ sugarizer_location }}/sugarizer"
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
|
- name: Untar to /library/www/html/{{ sugarizer_server_version }}
|
||||||
|
unarchive:
|
||||||
|
src: "{{ downloads_dir }}/{{ sugarizer_server_version }}.tar.gz"
|
||||||
|
dest: "{{ sugarizer_location }}"
|
||||||
|
creates: "{{ sugarizer_location }}/{{ sugarizer_server_version }}/index.html"
|
||||||
|
- name: Create symbolic link /library/www/html/sugarizer
|
||||||
|
file:
|
||||||
|
src: "{{ sugarizer_location }}/{{ sugarizer_server_version }}"
|
||||||
|
dest: "{{ sugarizer_location }}/sugarizer-server"
|
||||||
|
state: link
|
||||||
|
|
||||||
- name: Set up Node.js 6.x apt sources (debuntu)
|
- name: Set up Node.js 6.x apt sources (debuntu)
|
||||||
shell: curl -sL https://deb.nodesource.com/setup_6.x | bash -
|
shell: curl -sL https://deb.nodesource.com/setup_6.x | bash -
|
||||||
when: internet_available and is_debuntu and not is_ubuntu_18
|
when: internet_available and is_debuntu and not is_ubuntu_18
|
||||||
|
@ -52,7 +75,7 @@
|
||||||
# attempting to reinstall npm is broken on Raspbian 9
|
# attempting to reinstall npm is broken on Raspbian 9
|
||||||
- name: Check for Sugarizer already installed
|
- name: Check for Sugarizer already installed
|
||||||
stat:
|
stat:
|
||||||
path: "{{ sugarizer_location }}/sugarizer/server/node_modules"
|
path: "{{ sugarizer_location }}/{{ sugarizer_server_version }}/node_modules"
|
||||||
register: npm
|
register: npm
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
|
@ -70,7 +93,7 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'sugarizer.service.j2' , dest: '/etc/systemd/system/sugarizer.service'}
|
- { src: 'sugarizer.service.j2' , dest: '/etc/systemd/system/sugarizer.service'}
|
||||||
- { src: 'sugarizer.ini' , dest: '{{ sugarizer_location }}/sugarizer/server' }
|
- { src: 'sugarizer.ini' , dest: '{{ sugarizer_location }}/{{ sugarizer_server_version }}/env/sugarizer.ini' }
|
||||||
# - { src: 'sugarizer.conf' , dest: '/etc/apache2/sites-available' }
|
# - { src: 'sugarizer.conf' , dest: '/etc/apache2/sites-available' }
|
||||||
|
|
||||||
#- name: Create the symlink enabling the rewrite
|
#- name: Create the symlink enabling the rewrite
|
||||||
|
@ -81,8 +104,8 @@
|
||||||
- name: Create the express framework for Node.js (OS's other than Fedora 18)
|
- name: Create the express framework for Node.js (OS's other than Fedora 18)
|
||||||
shell: npm install
|
shell: npm install
|
||||||
args:
|
args:
|
||||||
chdir: "{{ sugarizer_location }}/sugarizer/server"
|
chdir: "{{ sugarizer_location }}/{{ sugarizer_server_version }}"
|
||||||
creates: "{{ sugarizer_location }}/sugarizer/server/node_modules"
|
creates: "{{ sugarizer_location }}/{{ sugarizer_server_version }}/server/node_modules"
|
||||||
when: not is_F18 and not npm_exists
|
when: not is_F18 and not npm_exists
|
||||||
|
|
||||||
- name: Create the express framework for Node.js (Fedora 18)
|
- name: Create the express framework for Node.js (Fedora 18)
|
||||||
|
|
|
@ -1,8 +1,21 @@
|
||||||
; Sugarizer configuration file
|
[information]
|
||||||
|
name = Sugarizer Server
|
||||||
|
description = Your Sugarizer Server
|
||||||
|
|
||||||
[web]
|
[web]
|
||||||
port = 8089
|
port = 8089
|
||||||
|
|
||||||
|
[security]
|
||||||
|
min_password_size = 4
|
||||||
|
max_age = 172800000
|
||||||
|
https = false
|
||||||
|
certificate_file = ../server.crt
|
||||||
|
key_file = ../server.key
|
||||||
|
strict_ssl = false
|
||||||
|
|
||||||
|
[client]
|
||||||
|
path = ../sugarizer/
|
||||||
|
|
||||||
[database]
|
[database]
|
||||||
server = localhost
|
server = localhost
|
||||||
port = 27018
|
port = 27018
|
||||||
|
@ -11,13 +24,16 @@ name = sugarizer
|
||||||
[presence]
|
[presence]
|
||||||
port = 8039
|
port = 8039
|
||||||
|
|
||||||
|
[statistics]
|
||||||
|
active = true
|
||||||
|
|
||||||
[collections]
|
[collections]
|
||||||
users = users
|
users = users
|
||||||
journal = journal
|
journal = journal
|
||||||
|
stats = stats
|
||||||
|
|
||||||
[activities]
|
[activities]
|
||||||
activities_directory_name = activities
|
activities_directory_name = activities
|
||||||
activities_path = ../activities
|
|
||||||
template_directory_name = ActivityTemplate
|
template_directory_name = ActivityTemplate
|
||||||
activity_info_path = activity/activity.info
|
activity_info_path = activity/activity.info
|
||||||
favorites = org.sugarlabs.GearsActivity,org.sugarlabs.MazeWebActivity,org.olpcfrance.PaintActivity,org.olpcfrance.TamTamMicro,org.olpcfrance.MemorizeActivity,org.olpg-france.physicsjs,org.sugarlabs.CalculateActivity,org.sugarlabs.TurtleBlocksJS,org.sugarlabs.Clock,,org.olpcfrance.RecordActivity,org.olpcfrance.Abecedarium,org.olpcfrance.KAView,org.olpcfrance.FoodChain,org.olpc-france.labyrinthjs,org.olpcfrance.TankOp,org.sugarlabs.ChatPrototype,org.olpcfrance.Gridpaint,org.olpc-france.LOLActivity,org.sugarlabs.StopwatchActivity,org.sugarlabs.GTDActivity,org.sugarlabs.Markdown,org.laptop.WelcomeWebActivity
|
favorites = org.sugarlabs.GearsActivity,org.sugarlabs.MazeWebActivity,org.olpcfrance.PaintActivity,org.olpcfrance.TamTamMicro,org.olpcfrance.MemorizeActivity,org.olpg-france.physicsjs,org.sugarlabs.CalculateActivity,org.sugarlabs.TurtleBlocksJS,org.sugarlabs.Clock,org.sugarlabs.SpeakActivity,org.sugarlabs.moon,org.olpcfrance.RecordActivity,org.olpcfrance.Abecedarium,org.olpcfrance.videoviewer,org.olpcfrance.FoodChain,org.olpc-france.labyrinthjs,org.olpcfrance.TankOp,org.sugarlabs.ChatPrototype,org.olpcfrance.Gridpaint,org.olpc-france.LOLActivity,org.olpcfrance.sharednotes,org.sugarlabs.ColorMyWorldActivity,com.homegrownapps.xoeditor,com.homegrownapps.reflection,com.homegrownapps.abacus,org.sugarlabs.Blockrain,org.sugarlabs.StopwatchActivity,com.homegrownapps.flip,org.somosazucar.JappyActivity,org.olpcfrance.qrcode,org.sugarlabs.Markdown,org.sugarlabs.gameOfLife,org.sugarlabs.Scratch,org.sugarlabs.FotoToonJs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue