1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00
This commit is contained in:
root 2020-11-04 08:44:39 -05:00
commit cbd0fefffe
7 changed files with 41 additions and 19 deletions

View file

@ -26,9 +26,9 @@ kiwix_library_xml: "{{ iiab_zim_path }}/library.xml"
# http://download.kiwix.org/release/kiwix-tools/ ...or sometimes...
# http://download.kiwix.org/nightly/
kiwix_version_armhf: kiwix-tools_linux-armhf-3.1.2
kiwix_version_linux64: kiwix-tools_linux-x86_64-3.1.2
kiwix_version_i686: kiwix-tools_linux-i586-3.1.2
kiwix_version_armhf: kiwix-tools_linux-armhf-3.1.2-3
kiwix_version_linux64: kiwix-tools_linux-x86_64-3.1.2-3
kiwix_version_i686: kiwix-tools_linux-i586-3.1.2-3
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2"
# v0.9 for i686 published May 2014 ("use it to test legacy ZIM content")

View file

@ -15,7 +15,7 @@
# mongodb_enabled: False
# mongodb_port: 27018
# mongodb_port: 27017
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!

View file

@ -114,12 +114,12 @@
- mongodb-org-server
state: present
- name: Change {{ mongodb_conf }} port to {{ mongodb_port }} -- takes effect on next (re)start of the service -- via enable-or-disable.yml or via sugarizer.service auto-starting MongoDB on demand
- name: Establish {{ mongodb_conf }} port {{ mongodb_port }} (mongodb_conf) -- takes effect on next (re)start of the service -- via enable-or-disable.yml or via sugarizer.service auto-starting MongoDB on demand
lineinfile:
path: "{{ mongodb_conf }}"
regexp: "port: 27017"
backrefs: yes
line: " port: {{ mongodb_port }}" # 27018
regexp: '^\s*port:' # \s = any whitespace char. stackoverflow.com/a/38491899
#backrefs: yes
line: " port: {{ mongodb_port }}" # 27017
# end block
when: (ansible_architecture == "aarch64") or (ansible_architecture == "x86_64")

View file

@ -5,7 +5,12 @@
# Comma separated list of ip addresses to listen on (all local ips by default)
bind_ip = 127.0.0.1
# Specify port number (27017 by default...but typically 27018 for IIAB)
# mongodb_port is set to 27017 in /opt/iiab/iiab/vars/default_vars.yml
# If you must change this, it's best to edit /etc/iiab/local_vars.yml prior to
# installing IIAB. Please also see upstream recommendations:
# https://github.com/llaske/sugarizer-server/blob/master/env/sugarizer.ini line ~22 under [database]
# https://docs.mongodb.com/manual/reference/default-mongodb-port/
# https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
port = {{ mongodb_port }}
# Fork server process (false by default)

View file

@ -176,7 +176,7 @@
- name: Set Sugarizer port to {{ sugarizer_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
regexp: "^port = 8080$"
regexp: '^port = 8080$'
line: "port = {{ sugarizer_port }}"
# 2019-02-02 No Longer Required thanks to @llaske's upstream fix:
@ -193,15 +193,19 @@
#- 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$"
# 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
# mongodb_port is set to 27017 in /opt/iiab/iiab/vars/default_vars.yml
# If you must change this, it's best to edit /etc/iiab/local_vars.yml prior to
# installing IIAB. Please also see upstream recommendations:
# https://github.com/llaske/sugarizer-server/blob/master/env/sugarizer.ini line ~22 under [database]
# https://docs.mongodb.com/manual/reference/default-mongodb-port/
# https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
- name: Set MongoDB port to {{ mongodb_port }} in /opt/iiab/sugarizer-server/env/sugarizer.ini
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/env/sugarizer.ini"
regexp: "^port = 27017$"
regexp: '^port = 27017$' # Careful as file also contains 2 other ports!
line: "port = {{ mongodb_port }}"
# 2-LINE FIX FOR sugarizer.js BY @georgejhunt FOR http://box/sugarizer
@ -211,7 +215,7 @@
- name: For http://box/sugarizer -- add pathPrefix lines in /opt/iiab/sugarizer-server/sugarizer.js
lineinfile:
path: "{{ iiab_base }}/sugarizer-server/sugarizer.js"
regexp: "AUTO-INSERTED BY IIAB" # avoids inserting it twice!
regexp: 'AUTO-INSERTED BY IIAB' # avoids inserting it twice!
insertbefore: "// Start listening$"
line: | # SEE https://yaml-multiline.info (use |+ to 'keep' newlines at end...though |8 and |+4 "indentation indicators" don't work with Ansible)
// AUTO-INSERTED BY IIAB FOR http://box/sugarizer

View file

@ -28,13 +28,26 @@
path: /etc/xdg/lxsession/LXDE-pi/autostart
register: lxde_present
- name: Add a chromium-browser to autostart if session manager is LXDE
- name: Check for Chromium name change
stat:
path: /usr/bin/chromium
register: chromium_present
- name: Add chromium-browser to /etc/xdg/lxsession/LXDE-pi/autostart if session manager is LXDE
lineinfile:
path: /etc/xdg/lxsession/LXDE-pi/autostart
regexp: '^/usr/bin/chromium-browser'
line: '/usr/bin/chromium-browser --ignore-certificate-errors --disable-restore-session-state http://box/home'
line: '/usr/bin/chromium-browser --disable-restore-session-state http://box/home'
when:
lxde_present.stat.exists
lxde_present.stat.exists and not chromium_present.stat.exists
- name: Add chromium to /etc/xdg/lxsession/LXDE-pi/autostart if session manager is LXDE
lineinfile:
path: /etc/xdg/lxsession/LXDE-pi/autostart
regexp: '^/usr/bin/chromium'
line: '/usr/bin/chromium --disable-restore-session-state http://box/home'
when:
lxde_present.stat.exists and chromium_present.stat.exists
- debug:
msg: 'THE 3 ANSIBLE STANZAS BELOW ONLY RUN... when: (nginx_high_php_limits or moodle_install or nextcloud_install or pbx_install or wordpress_install) and nginx_enabled'

View file

@ -485,7 +485,7 @@ mongodb_install: False
# misleading as Sugarizer starts mongodb's systemd service on its own, due to
# 'Requires=mongodb.service' within /etc/systemd/system/sugarizer.service
mongodb_enabled: False
mongodb_port: 27018
mongodb_port: 27017
# roles/sugarizer/meta/main.yml auto-invokes 2 above prereqs: mongodb & nodejs
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879