1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #156 from iiab/master

sync from iiab/iiab
This commit is contained in:
A Holt 2018-09-20 00:34:57 -04:00 committed by GitHub
commit 24c8423f68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 105 additions and 64 deletions

View file

@ -37,6 +37,18 @@
set_fact:
uuid: "{{ stored_uuid.stdout_lines[0] }}"
- name: SSHD
include_role:
name: sshd
# has no "when: XXXXX_install" flag
tags: base, sshd
- name: OPENVPN
include_role:
name: openvpn
when: openvpn_install
tags: openvpn
# for rpi, without rtc, we need time as soon as possible
- name: Install chrony package
package:

View file

@ -3,19 +3,6 @@
- name: ...IS BEGINNING ==================================
command: echo
# MANDATORY SO PERHAPS THIS BELONGS IN 3-BASE-SERVER ?
- name: SSHD
include_role:
name: sshd
# has no "when: XXXXX_install" flag
tags: base, sshd
- name: OPENVPN
include_role:
name: openvpn
when: openvpn_install
tags: openvpn
- name: Installing dnsmasq
include_tasks: roles/network/tasks/dnsmasq.yml
when: dnsmasq_install

View file

@ -30,7 +30,7 @@
- name: OSM
include_role:
name: osm
when: osm_install
when: osm_install is defined and osm_install
tags: osm
- name: PATHAGAR

View file

@ -0,0 +1,3 @@
# For new vector tileset, as documented @ http://FAQ.IIAB.IO ("How do I add zoomable maps for my region? ") & http://download.iiab.io/content/OSM/vector-tiles/
Alias /maps /library/www/html/modules/en-osm-omt-min/
Alias /osm /library/www/html/modules/en-osm-omt-min/

View file

@ -170,6 +170,23 @@
state: absent
when: is_debuntu
# SEE https://github.com/iiab/iiab/issues/1143 as the old roles/osm playbook is rarely used as of late 2018 (if anybody still uses roles/osm, they can overwrite osm.conf using the original osm playbook, or in other ways)
- name: Copy osm.conf for http://box/maps (all OS's)
copy:
src: osm.conf
dest: "/etc/{{ apache_config_dir }}"
owner: root
group: root
mode: 0644
backup: yes
- name: Create link from sites-enabled to sites-available (debuntu)
file:
src: "/etc/{{ apache_config_dir }}/osm.conf"
dest: /etc/apache2/sites-enabled/osm.conf
state: link
when: is_debuntu
- include_tasks: html.yml
tags:
- base

View file

@ -21,23 +21,6 @@
name: "{{ iiab_admin_user }}"
groups: wheel,sudo
- name: Create root .ssh
file:
path: /root/.ssh
owner: root
group: root
mode: 0700
state: directory
- name: Install dummy root keys as placeholder
copy:
src: dummy_authorized_keys
dest: /root/.ssh/authorized_keys
owner: root
group: root
mode: 0600
force: no
- name: Edit the sudoers file -- first make it editable
file:
path: /etc/sudoers

View file

@ -8,9 +8,10 @@ WSGIScriptAlias /iiab {{ doc_root }}/osm.wsgi
# For old bitmap/raster tileset
Alias /iiabstatic {{ osm_path }}/static
# For new vector tileset, as documented @ http://FAQ.IIAB.IO ("How do I add zoomable maps for my region? ") & http://download.iiab.io/content/OSM/vector-tiles/
Alias /maps /library/www/html/modules/en-osm-omt-min/
Alias /osm /library/www/html/modules/en-osm-omt-min/
# 2018-09-19: placement of osm.conf (for http://box/maps) moved to roles/httpd/tasks/main.yml to economize ~5 min during RPi install, now that this (older) osm playbook is rarely used
## For new vector tileset, as documented @ http://FAQ.IIAB.IO ("How do I add zoomable maps for my region? ") & http://download.iiab.io/content/OSM/vector-tiles/
#Alias /maps /library/www/html/modules/en-osm-omt-min/
#Alias /osm /library/www/html/modules/en-osm-omt-min/
<Directory {{ osm_path }}/static>
require all granted

View file

@ -1,18 +1,40 @@
- name: Disable root login with password
lineinfile: dest=/etc/ssh/sshd_config
regexp='^PermitRootLogin'
line='PermitRootLogin without-password'
state=present
lineinfile:
dest: /etc/ssh/sshd_config
regexp: '^PermitRootLogin'
line: 'PermitRootLogin without-password'
state: present
#TODO: use handler to reload ssh
- name: Enable sshd
service: name={{ sshd_service }}
enabled=yes
state=started
- name: Create root .ssh
file:
path: /root/.ssh
owner: root
group: root
mode: 0700
state: directory
when: sshd_enabled
- name: Install dummy root keys as placeholder
copy:
src: dummy_authorized_keys
dest: /root/.ssh/authorized_keys
owner: root
group: root
mode: 0600
force: no
when: sshd_enabled
- name: Enable & start sshd
service:
name: "{{ sshd_service }}"
enabled: yes
state: started
when: sshd_enabled
- name: Disable sshd
service: name={{ sshd_service }}
enabled=no
state=stopped
service:
name: "{{ sshd_service }}"
enabled: no
state: stopped
when: not sshd_enabled

View file

@ -310,13 +310,6 @@ iiab_zim_path: /library/zims
moodle_install: False
moodle_enabled: False
# OpenStreetMap (OSM)
osm_install: True
osm_enabled: False
# changed in June 2017 from:
# iiab_install: True
# iiab_enabled: False
# Sugarizer
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
@ -423,6 +416,17 @@ calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# PLEASE CONSIDER THESE 2 NEW MAPS APPROACHES INSTEAD, AS OF 2018:
# - http://download.iiab.io/content/OSM/vector-tiles/
# - http://oer2go.org/viewmod/en-worldmap-10
#
# OpenStreetMap (OSM) legacy - unmaintained:
# osm_install: False
# osm_enabled: False
# Changed in June 2017, from the original:
# iiab_install: True
# iiab_enabled: False
# TeamViewer - unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False
# teamviewer_enabled: False

View file

@ -174,10 +174,6 @@ kiwix_enabled: True
moodle_install: True
moodle_enabled: True
# OpenStreetMap: renamed from {iiab_install, iiab_enabled} in June 2017
osm_install: True
osm_enabled: True
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
sugarizer_install: True
@ -254,6 +250,14 @@ calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# PLEASE CONSIDER THESE 2 NEW MAPS APPROACHES INSTEAD, AS OF 2018:
# - http://download.iiab.io/content/OSM/vector-tiles/
# - http://oer2go.org/viewmod/en-worldmap-10
#
# Unmaintained - OpenStreetMap (OSM) legacy
# osm_install: False
# osm_enabled: False
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False
# teamviewer_enabled: False

View file

@ -174,10 +174,6 @@ kiwix_enabled: True
moodle_install: False
moodle_enabled: False
# OpenStreetMap: renamed from {iiab_install, iiab_enabled} in June 2017
osm_install: True
osm_enabled: True
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
sugarizer_install: True
@ -254,6 +250,14 @@ calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# PLEASE CONSIDER THESE 2 NEW MAPS APPROACHES INSTEAD, AS OF 2018:
# - http://download.iiab.io/content/OSM/vector-tiles/
# - http://oer2go.org/viewmod/en-worldmap-10
#
# Unmaintained - OpenStreetMap (OSM) legacy
# osm_install: False
# osm_enabled: False
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False
# teamviewer_enabled: False

View file

@ -174,10 +174,6 @@ kiwix_enabled: True
moodle_install: False
moodle_enabled: False
# OpenStreetMap: renamed from {iiab_install, iiab_enabled} in June 2017
osm_install: False
osm_enabled: False
# Might stall MongoDB on Power Failure: github.com/xsce/xsce/issues/879
# Sugarizer 1.0.1+ strategies to solve? github.com/iiab/iiab/pull/957
sugarizer_install: False
@ -254,6 +250,14 @@ calibreweb_url: /books
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
# PLEASE CONSIDER THESE 2 NEW MAPS APPROACHES INSTEAD, AS OF 2018:
# - http://download.iiab.io/content/OSM/vector-tiles/
# - http://oer2go.org/viewmod/en-worldmap-10
#
# Unmaintained - OpenStreetMap (OSM) legacy
# osm_install: False
# osm_enabled: False
# Unmaintained (better to install from http://teamviewer.com or prep scripts at http://download.iiab.io)
# teamviewer_install: False
# teamviewer_enabled: False