From 787b7df70122853f79b537afe1918caaca5eab4f Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Sep 2020 09:56:59 -0400 Subject: [PATCH 1/5] lint for release: osm-vector-maps/tasks/install.yml --- roles/osm-vector-maps/tasks/install.yml | 149 ++++++++++++------------ 1 file changed, 75 insertions(+), 74 deletions(-) diff --git a/roles/osm-vector-maps/tasks/install.yml b/roles/osm-vector-maps/tasks/install.yml index fb73fe0dd..a8b946f3a 100644 --- a/roles/osm-vector-maps/tasks/install.yml +++ b/roles/osm-vector-maps/tasks/install.yml @@ -61,22 +61,22 @@ - name: Fetch the javascript bundle with openlayers for Viewer page # At this point, fetches from github.com/iiab/maps from {{ maps_branch }} branch get_url: - url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/build/{{ item }}" - dest: '{{ vector_map_path }}/viewer/' + url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/build/{{ item }}" + dest: '{{ vector_map_path }}/viewer/' with_items: - - index.html - - viewer-bundle.js - - viewer-bundle.js.map + - index.html + - viewer-bundle.js + - viewer-bundle.js.map - name: Get the helper files for viewer get_url: - url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/{{ item }}" - dest: '{{ vector_map_path }}/viewer/' + url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/{{ item }}" + dest: '{{ vector_map_path }}/viewer/' with_items: - - mbtileinfo.php - - popup.css - - searchapi.php - - tileserver.php + - mbtileinfo.php + - popup.css + - searchapi.php + - tileserver.php - name: Copy the map installer mbtiles get_url: @@ -85,15 +85,15 @@ - name: Create a synlink from tiles to detail.mbtiles file: - src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' - dest: '{{ vector_map_path }}/installer/detail.mbtiles' - state: link + src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' + dest: '{{ vector_map_path }}/installer/detail.mbtiles' + state: link - name: Link to the World Map to zoom 6 file: - src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' - dest: '{{ vector_map_path }}/viewer/tiles/planet_z0-z6_2019.mbtiles' - state: link + src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' + dest: '{{ vector_map_path }}/viewer/tiles/planet_z0-z6_2019.mbtiles' + state: link - name: Copy the map abbreviated satellite images get_url: @@ -105,92 +105,92 @@ url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/build/{{ item }}" dest: '{{ vector_map_path }}/installer/' with_items: - - index.html - - installer-bundle.js + - index.html + - installer-bundle.js - name: Fetch the action routines for installer get_url: url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/{{ item }}" dest: '{{ vector_map_path }}/installer/' with_items: - - map.css - - style-osm.json - - installer-functions.js - - tileserver.php + - map.css + - style-osm.json + - installer-functions.js + - tileserver.php # the following was changed to grab from the iiab/maps repo - name: Copy the common assets for the general purpose map viewer get_url: - url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/{{ item }}" - dest: "{{ vector_map_path }}/viewer/assets" + url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/{{ item }}" + dest: "{{ vector_map_path }}/viewer/assets" with_items: - - bboxes.geojson - - center.png - - countries.json - - fonts.css - - ol-layerswitcher.css - - ol-contextmenu.css - - pin_drop.png - - sprite@2x.json - - sprite@2x.png - - sprite.json - - sprite.png - - style-cdn.json - - style-osm.json - - style-sat.json - - view_list.png + - bboxes.geojson + - center.png + - countries.json + - fonts.css + - ol-layerswitcher.css + - ol-contextmenu.css + - pin_drop.png + - sprite@2x.json + - sprite@2x.png + - sprite.json + - sprite.png + - style-cdn.json + - style-osm.json + - style-sat.json + - view_list.png - name: Place a link to bboxes.geojson for Admin Console file: - src: "{{ vector_map_path }}/viewer/assets/bboxes.geojson" - dest: "{{ vector_map_path }}/maplist/assets/bboxes.geojson" - state: link - force: True - + src: "{{ vector_map_path }}/viewer/assets/bboxes.geojson" + dest: "{{ vector_map_path }}/maplist/assets/bboxes.geojson" + state: link + force: True + - name: Place a link to countries.json for Admin Console file: - src: "{{ vector_map_path }}/viewer/assets/countries.json" - dest: "{{ vector_map_path }}/maplist/assets/countries.json" - state: link - force: True - + src: "{{ vector_map_path }}/viewer/assets/countries.json" + dest: "{{ vector_map_path }}/maplist/assets/countries.json" + state: link + force: True + - name: Copy the fonts for the general purpose map viewer copy: - src: "{{ item }}" - dest: "{{ doc_root }}/common/fonts/" - mode: 0644 - owner: root - group: root + src: "{{ item }}" + dest: "{{ doc_root }}/common/fonts/" + mode: 0644 + owner: root + group: root with_fileglob: - - fonts/* + - fonts/* - name: Copy the redirect to the test page get_url: - url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/installer-index.redirect" - dest: "{{ vector_map_path }}/maplist/index.html" - force: yes + url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/installer-index.redirect" + dest: "{{ vector_map_path }}/maplist/index.html" + force: yes - name: Get packages necessary for map installation package: - state: present - name: - - python3-wget - - "php{{ php_version }}-sqlite3" - - python3-geojson - - python3-pil + state: present + name: + - python3-wget + - "php{{ php_version }}-sqlite3" + - python3-geojson + - python3-pil - name: Copy a scripts to download tiles get_url: - url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/scripts/{{ item }}" - dest: /usr/bin/ - mode: 0755 + url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/scripts/{{ item }}" + dest: /usr/bin/ + mode: 0755 with_items: - - iiab-install-map-region - - iiab-extend-sat.py - - iiab-summarize.sh - - iiab-maps-finish.py - - iiab-make-init.py - - iiab-update-map + - iiab-install-map-region + - iiab-extend-sat.py + - iiab-summarize.sh + - iiab-maps-finish.py + - iiab-make-init.py + - iiab-update-map - name: Install /etc/nginx/osm-vector-maps-nginx.conf from template template: @@ -199,6 +199,7 @@ when: osm_vector_maps_install | bool + # RECORD OSM Vector Maps AS INSTALLED - name: "Set 'osm_vector_maps_installed: True'" From 3e7ae3351d8028ac9bf5fceda12d83702a8b802d Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Sep 2020 09:57:13 -0400 Subject: [PATCH 2/5] lint for release: osm-vector-maps/tasks/main.yml --- roles/osm-vector-maps/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/osm-vector-maps/tasks/main.yml b/roles/osm-vector-maps/tasks/main.yml index acad3a00c..9a14ecfaf 100644 --- a/roles/osm-vector-maps/tasks/main.yml +++ b/roles/osm-vector-maps/tasks/main.yml @@ -19,6 +19,7 @@ include_tasks: nginx.yml when: nginx_enabled | bool + - name: Add 'osm-vector-maps' variable values to {{ iiab_ini_file }} ini_file: path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini From c07ae9bbd6f4721633feaab701a197b2f91c3bbc Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Sep 2020 10:00:40 -0400 Subject: [PATCH 3/5] lint for release: osm-vector-maps/tasks/main.yml --- roles/osm-vector-maps/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/osm-vector-maps/tasks/main.yml b/roles/osm-vector-maps/tasks/main.yml index 9a14ecfaf..826f22e39 100644 --- a/roles/osm-vector-maps/tasks/main.yml +++ b/roles/osm-vector-maps/tasks/main.yml @@ -14,6 +14,7 @@ - name: Install OSM Vector Maps if 'osm_vector_maps_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml include_tasks: install.yml when: osm_vector_maps_installed is undefined + - name: Enable/Disable/Reload NGINX for OSM, if nginx_enabled include_tasks: nginx.yml From 61a204f6e406698ae3353b5e5fafabb1e4bf3151 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Sep 2020 10:39:06 -0400 Subject: [PATCH 4/5] lint for release: osm-vector-maps/tasks/install.yml --- roles/osm-vector-maps/tasks/install.yml | 56 ++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/roles/osm-vector-maps/tasks/install.yml b/roles/osm-vector-maps/tasks/install.yml index a8b946f3a..70bb3e73a 100644 --- a/roles/osm-vector-maps/tasks/install.yml +++ b/roles/osm-vector-maps/tasks/install.yml @@ -1,19 +1,19 @@ - name: Make the required directories for Maps file: - path: '{{ item }}' + path: "{{ item }}" state: directory mode: '0755' with_items: - - '{{ vector_map_path }}/test-page/assets' - - '{{ vector_map_path }}/maplist/assets' - - '{{ vector_map_path }}/viewer/assets' - - '{{ vector_map_path }}/viewer/tiles' - - '{{ vector_map_path }}/installer' + - "{{ vector_map_path }}/test-page/assets" # /library/www/osm-vector-maps + - "{{ vector_map_path }}/maplist/assets" + - "{{ vector_map_path }}/viewer/assets" + - "{{ vector_map_path }}/viewer/tiles" + - "{{ vector_map_path }}/installer" - name: Copy the map catalog to /etc/iiab/map-catalog.json get_url: - url: "{{ map_catalog_url }}/map-catalog.json" - dest: /etc/iiab/ + url: "{{ map_catalog_url }}/map-catalog.json" # http://download.iiab.io/content/OSM/vector-tiles + dest: "{{ iiab_etc_path }}" # /etc/iiab - name: Download map catalog {{ iiab_map_url }}/assets/regions.json to {{ iiab_etc_path }} get_url: @@ -28,24 +28,24 @@ - name: Fetch the city database get_url: url: "{{ iiab_map_url }}/regional-resources/cities1000.sqlite" - dest: '{{ vector_map_path }}/viewer/cities1000.sqlite' + dest: "{{ vector_map_path }}/viewer/cities1000.sqlite" when: not cities_installed.stat.exists - name: Create a link to osm catalog in /common/assets file: - src: "/etc/iiab/map-catalog.json" - dest: "{{ doc_root }}/common/assets/map-catalog.json" + src: /etc/iiab/map-catalog.json + dest: "{{ doc_root }}/common/assets/map-catalog.json" # /library/www/html state: link - name: Create a link to osm catalog in {{ vector_map_path }}/maplist/assets file: - src: "/etc/iiab/map-catalog.json" + src: /etc/iiab/map-catalog.json dest: "{{ vector_map_path }}/test-page/assets/map-catalog.json" state: link - name: Create a link to regions.json in {{ vector_map_path }}/maplist/assets file: - src: "/etc/iiab/regions.json" + src: /etc/iiab/regions.json dest: "{{ vector_map_path }}/maplist/assets/regions.json" state: link @@ -53,16 +53,16 @@ # At this point, fetches from github.com/georgejhunt/maps from test branch get_url: url: "{{ item }}" - dest: '{{ vector_map_path }}/test-page/' + dest: "{{ vector_map_path }}/test-page/" with_items: - - "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/test-page/build/test-page-bundle.js" + - "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/test-page/build/test-page-bundle.js" # https://raw.githubusercontent.com/iiab/maps / master - "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/test-page/build/index.html" - name: Fetch the javascript bundle with openlayers for Viewer page # At this point, fetches from github.com/iiab/maps from {{ maps_branch }} branch get_url: url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/build/{{ item }}" - dest: '{{ vector_map_path }}/viewer/' + dest: "{{ vector_map_path }}/viewer/" with_items: - index.html - viewer-bundle.js @@ -71,7 +71,7 @@ - name: Get the helper files for viewer get_url: url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/{{ item }}" - dest: '{{ vector_map_path }}/viewer/' + dest: "{{ vector_map_path }}/viewer/" with_items: - mbtileinfo.php - popup.css @@ -81,29 +81,29 @@ - name: Copy the map installer mbtiles get_url: url: "{{ map_catalog_url }}/planet_z0-z6_2019.mbtiles" - dest: '{{ vector_map_path }}/installer/' + dest: "{{ vector_map_path }}/installer/" - name: Create a synlink from tiles to detail.mbtiles file: - src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' - dest: '{{ vector_map_path }}/installer/detail.mbtiles' + src: "{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles" + dest: "{{ vector_map_path }}/installer/detail.mbtiles" state: link - name: Link to the World Map to zoom 6 file: - src: '{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles' - dest: '{{ vector_map_path }}/viewer/tiles/planet_z0-z6_2019.mbtiles' + src: "{{ vector_map_path }}/installer/planet_z0-z6_2019.mbtiles" + dest: "{{ vector_map_path }}/viewer/tiles/planet_z0-z6_2019.mbtiles" state: link - name: Copy the map abbreviated satellite images get_url: url: "{{ map_catalog_url }}/satellite_z0-z6_v3.mbtiles" - dest: '{{ vector_map_path }}/viewer/tiles/satellite_z0-z6_v3.mbtiles' + dest: "{{ vector_map_path }}/viewer/tiles/satellite_z0-z6_v3.mbtiles" - name: Fetch the javascript bundle for map installer get_url: url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/build/{{ item }}" - dest: '{{ vector_map_path }}/installer/' + dest: "{{ vector_map_path }}/installer/" with_items: - index.html - installer-bundle.js @@ -111,7 +111,7 @@ - name: Fetch the action routines for installer get_url: url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/{{ item }}" - dest: '{{ vector_map_path }}/installer/' + dest: "{{ vector_map_path }}/installer/" with_items: - map.css - style-osm.json @@ -141,14 +141,14 @@ - view_list.png - name: Place a link to bboxes.geojson for Admin Console - file: + file: src: "{{ vector_map_path }}/viewer/assets/bboxes.geojson" dest: "{{ vector_map_path }}/maplist/assets/bboxes.geojson" state: link force: True - name: Place a link to countries.json for Admin Console - file: + file: src: "{{ vector_map_path }}/viewer/assets/countries.json" dest: "{{ vector_map_path }}/maplist/assets/countries.json" state: link @@ -195,7 +195,7 @@ - name: Install /etc/nginx/osm-vector-maps-nginx.conf from template template: src: osm-vector-maps-nginx.conf.j2 - dest: "/etc/nginx/conf.d/osm-vector-maps-nginx.conf" + dest: /etc/nginx/conf.d/osm-vector-maps-nginx.conf when: osm_vector_maps_install | bool From ad7eba5f744507e140c27dd61839a69e2e00ede7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 26 Sep 2020 11:46:11 -0400 Subject: [PATCH 5/5] Refine roles/lokole/README.rst --- roles/lokole/README.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/lokole/README.rst b/roles/lokole/README.rst index 3557642c5..a954a29ab 100644 --- a/roles/lokole/README.rst +++ b/roles/lokole/README.rst @@ -17,7 +17,9 @@ For an up-to-date list of supported languages, refer to the `Lokole translations Using It -------- -The Lokole web app can be accessed at http://box/lokole +If your IIAB was `installed `_ with the Lokole web app[*] it can be accessed at http://box/lokole + +[*] If you're not sure, verify that your IIAB's `/etc/iiab/local_vars.yml `_ contains ``lokole_install: True`` and ``lokole_enabled: True`` Administration --------------