mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update main.yml
This commit is contained in:
parent
7a7bbc77aa
commit
8d7354dfc2
1 changed files with 18 additions and 21 deletions
|
@ -135,7 +135,7 @@
|
||||||
# when: internet_available and is_F18 and not node_modules_exists
|
# when: internet_available and is_F18 and not node_modules_exists
|
||||||
|
|
||||||
# Add a nodejs express function that appends a prefix to urls
|
# Add a nodejs express function that appends a prefix to urls
|
||||||
- name: Run 'npm install --allow-root --unsafe-perm=true path-prefix-proxy' to create /opt/iiab/sugarizer-server/node_modules/path-prefix-proxy
|
- name: For http://box/sugarizer -- run 'npm install --allow-root --unsafe-perm=true path-prefix-proxy' to create /opt/iiab/sugarizer-server/node_modules/path-prefix-proxy
|
||||||
command: npm install --allow-root --unsafe-perm=true path-prefix-proxy
|
command: npm install --allow-root --unsafe-perm=true path-prefix-proxy
|
||||||
args:
|
args:
|
||||||
chdir: "{{ sugarizer_location }}/sugarizer-server"
|
chdir: "{{ sugarizer_location }}/sugarizer-server"
|
||||||
|
@ -157,9 +157,11 @@
|
||||||
#- { src: 'sugarizer.ini.j2', dest: '{{ sugarizer_location }}/sugarizer-server/env/sugarizer.ini' }
|
#- { src: 'sugarizer.ini.j2', dest: '{{ sugarizer_location }}/sugarizer-server/env/sugarizer.ini' }
|
||||||
#- { src: 'sugarizer.js', dest: '{{ sugarizer_location }}/sugarizer-server' }
|
#- { src: 'sugarizer.js', dest: '{{ sugarizer_location }}/sugarizer-server' }
|
||||||
|
|
||||||
|
# 3 STANZAS ADDED BELOW JAN/FEB 2019, HOPING THIS MIGHT "JUST WORK" WITH FUTURE
|
||||||
|
# UPGRADES BEYOND SUGARIZER 1.1? SEE: github.com/iiab/iiab/pull/1430/files
|
||||||
|
|
||||||
# sugarizer_port is set to 8089 in /opt/iiab/iiab/vars/default_vars.yml
|
# sugarizer_port is set to 8089 in /opt/iiab/iiab/vars/default_vars.yml
|
||||||
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
||||||
# SEE https://github.com/iiab/iiab/pull/1430#issuecomment-459129378
|
|
||||||
- name: Set Sugarizer port to {{ sugarizer_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
|
- name: Set Sugarizer port to {{ sugarizer_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /opt/iiab/sugarizer-server/env/sugarizer.ini
|
path: /opt/iiab/sugarizer-server/env/sugarizer.ini
|
||||||
|
@ -168,7 +170,6 @@
|
||||||
|
|
||||||
# mongodb_port is set to 27018 in /opt/iiab/iiab/vars/default_vars.yml
|
# mongodb_port is set to 27018 in /opt/iiab/iiab/vars/default_vars.yml
|
||||||
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
|
||||||
# SEE https://github.com/iiab/iiab/pull/1430#issuecomment-459129378
|
|
||||||
- name: Set MongoDB port to {{ mongodb_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
|
- name: Set MongoDB port to {{ mongodb_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /opt/iiab/sugarizer-server/env/sugarizer.ini
|
path: /opt/iiab/sugarizer-server/env/sugarizer.ini
|
||||||
|
@ -176,24 +177,20 @@
|
||||||
line: "port = {{ mongodb_port }}"
|
line: "port = {{ mongodb_port }}"
|
||||||
|
|
||||||
# 2-LINE FIX FOR sugarizer.js BY @georgejhunt FOR http://box/sugarizer
|
# 2-LINE FIX FOR sugarizer.js BY @georgejhunt FOR http://box/sugarizer
|
||||||
# SEE https://github.com/iiab/iiab/pull/1430#issuecomment-459129378
|
# REQUIRES above 'npm install --allow-root --unsafe-perm=true path-prefix-proxy'
|
||||||
#
|
# OR YOU GET ERRORS: "status=255" within "systemctl status sugarizer"
|
||||||
# 2019-02-02: USED TO WORK ON Node.js 8.x BUT SUGARIZER NO LONGER STARTS ON Node.js 10.x
|
# "Cannot find module 'path-prefix-proxy'" within "journalctl -eu sugarizer"
|
||||||
# As tested w/ MongoDB 3.0.14 (binaries) on RPi and MongoDB 3.6.3 (apt) on Ubuntu 18.04
|
- name: For http://box/sugarizer -- add pathPrefix /sugarizer in /opt/iiab/sugarizer-server/sugarizer.js
|
||||||
# Errors are: "status=255" within "systemctl status sugarizer"
|
lineinfile:
|
||||||
# "Cannot find module 'path-prefix-proxy'" within "journalctl -eu sugarizer"
|
path: /opt/iiab/sugarizer-server/sugarizer.js
|
||||||
#
|
regexp: "AUTO-INSERTED BY IIAB" # avoids inserting it twice!
|
||||||
#- name: Customize pathPrefix /sugarizer in /opt/iiab/sugarizer-server/sugarizer.js
|
insertbefore: "// Start listening$"
|
||||||
# lineinfile:
|
line: | # SEE https://yaml-multiline.info (use |+ to 'keep' newlines at end...though |8 and |+4 "indentation indicators" don't work with Ansible)
|
||||||
# path: /opt/iiab/sugarizer-server/sugarizer.js
|
// AUTO-INSERTED BY IIAB FOR http://box/sugarizer
|
||||||
# regexp: "AUTO-INSERTED BY IIAB" # avoids inserting it twice!
|
var pathPrefix = '/sugarizer';
|
||||||
# insertbefore: "// Start listening$"
|
app.use(pathPrefix, require('path-prefix-proxy')(pathPrefix));
|
||||||
# line: | # SEE https://yaml-multiline.info (use |+ to 'keep' newlines at end...though |8 and |+4 "indentation indicators" don't work with Ansible)
|
# Use this instead, if tabs are truly nec:
|
||||||
# // AUTO-INSERTED BY IIAB FOR http://box/sugarizer
|
# line: "\t// AUTO-INSERTED BY IIAB FOR http://box/sugarizer\n\tvar pathPrefix = '/sugarizer';\n\tapp.use(pathPrefix, require('path-prefix-proxy')(pathPrefix));\n"
|
||||||
# var pathPrefix = '/sugarizer';
|
|
||||||
# app.use(pathPrefix, require('path-prefix-proxy')(pathPrefix));
|
|
||||||
# # Use this instead, if tabs are truly nec:
|
|
||||||
# # line: "\t// AUTO-INSERTED BY IIAB FOR http://box/sugarizer\n\tvar pathPrefix = '/sugarizer';\n\tapp.use(pathPrefix, require('path-prefix-proxy')(pathPrefix));\n"
|
|
||||||
|
|
||||||
# Ansible's blockinfile module:
|
# Ansible's blockinfile module:
|
||||||
# - inserts a mandatory marker line at beginning AND end of the block...ok fine
|
# - inserts a mandatory marker line at beginning AND end of the block...ok fine
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue