1
0
Fork 0
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:
A Holt 2019-02-02 17:47:47 -05:00 committed by GitHub
parent fb5346776c
commit 12dd0d7613
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,7 +135,7 @@
# when: internet_available and is_F18 and not node_modules_exists
# Add a Node.js Express function that appends a prefix to URLs.
# SEE "AUTO-INSERTED BY IIAB" ~59 LINES BELOW: as those two "pathPrefix" lines
# SEE "AUTO-INSERTED BY IIAB" ~61 LINES BELOW: as those two "pathPrefix" lines
# MUST be added to /opt/iiab/sugarizer-server/sugarizer.js
- 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
@ -159,8 +159,8 @@
#- { src: 'sugarizer.ini.j2', dest: '{{ iiab_base }}/sugarizer-server/env/sugarizer.ini' }
#- { src: 'sugarizer.js', dest: '{{ iiab_base }}/sugarizer-server' }
# 4 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
# 3 [WAS 4] 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
# If you need to change this, edit /etc/iiab/local_vars.yml prior to installing
@ -170,20 +170,22 @@
regexp: "^port = 8080$"
line: "port = {{ sugarizer_port }}"
# 2019-02-01: HACK REQUIRED FOR NOW ON UBUNTU 18.04 so Sugarizer finds MongoDB
# after 1st reboot. Otherwise "Waiting for DB..." appears every second as
# shown by "systemctl status sugarizer" and "journalctl -eu sugarizer".
# This does NOT affect Raspbian. @jvonau wonders if Ubuntu's
# "nameserver 127.0.0.53" in /etc/resolv.conf is to blame? @m-anish wondered
# if "bind_ip: 127.0.0.1" in /etc/mongod.conf was to blame as suggested by
# https://stackoverflow.com/questions/8904991/mongodb-cant-connect-to-localhost-but-can-connect-to-localhosts-ip-address
# But changing to "bind_ip: localhost" does not work with Sugarizer, and
# "bind_ip: 127.0.0.1,localhost" is not allowed. BACKGROUND: PR #1430
- name: Set MongoDB "server" from localhost to 127.0.0.1 in /opt/iiab/sugarizer-server/env/sugarizer.ini
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
regexp: "^server = localhost$"
line: "server = 127.0.0.1"
# 2019-02-02 No Longer Required thanks to @llaske's upstream fix:
# https://github.com/llaske/sugarizer-server/commit/46c4822bc7801ff8d621c22988aa4418359e7e19
## 2019-02-02: HACK WAS REQUIRED ON UBUNTU 18.04 so Sugarizer finds MongoDB
## after 1st reboot. Otherwise "Waiting for DB..." appears every second as
## shown by "systemctl status sugarizer" and "journalctl -eu sugarizer".
## This does NOT affect Ubuntu 16.04 or Raspbian. @jvonau wonders if U18.04's
## "nameserver 127.0.0.53" in /etc/resolv.conf is to blame? @m-anish wondered
## if "bind_ip: 127.0.0.1" in /etc/mongod.conf was to blame as suggested by
## https://stackoverflow.com/questions/8904991/mongodb-cant-connect-to-localhost-but-can-connect-to-localhosts-ip-address
## But changing to "bind_ip: localhost" does not work with Sugarizer, and
## "bind_ip: 127.0.0.1,localhost" is not allowed. BACKGROUND: PR #1430
#- name: Set MongoDB "server" from localhost to 127.0.0.1 in /opt/iiab/sugarizer-server/env/sugarizer.ini
# lineinfile:
# path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
# regexp: "^server = localhost$"
# line: "server = 127.0.0.1"
# 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
@ -194,7 +196,7 @@
line: "port = {{ mongodb_port }}"
# 2-LINE FIX FOR sugarizer.js BY @georgejhunt FOR http://box/sugarizer
# SEE ~59 LINES ABOVE, as this is REQUIRED: 'npm install --allow-root --unsafe-perm=true path-prefix-proxy'
# SEE ~61 LINES ABOVE, as this is REQUIRED: 'npm install --allow-root --unsafe-perm=true path-prefix-proxy'
# OR YOU GET ERRORS: "status=255" within "systemctl status sugarizer"
# "Cannot find module 'path-prefix-proxy'" within "journalctl -eu sugarizer"
- name: For http://box/sugarizer -- add pathPrefix lines in /opt/iiab/sugarizer-server/sugarizer.js