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

Update osm-vector-maps/tasks/install.yml

This commit is contained in:
A Holt 2020-01-27 00:56:47 -05:00 committed by GitHub
parent e61230c817
commit 696c15e06f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,38 @@
- name: Ensure directory {{ vector_map_path }}/maplist/assets exists - name: Ensure directory {{ vector_map_path }}/maplist/assets exists
file: file:
path: "{{ vector_map_path }}/maplist/assets" path: "{{ vector_map_path }}/maplist/assets" # /library/www/osm-vector-maps
state: directory state: directory
owner: "{{ apache_user }}" owner: "{{ apache_user }}" # Typically 'www-data' or 'apache'
group: "{{ apache_user }}" group: "{{ apache_user }}"
mode: '0755' mode: '0755'
- name: Download map catalog {{ iiab_map_url }}/assets/regions.json to {{ vector_map_path }}/maplist/assets/ - name: Download map catalog {{ iiab_map_url }}/assets/regions.json to {{ vector_map_path }}/maplist/assets/
get_url: get_url:
url: "{{ iiab_map_url }}/assets/regions.json" url: "{{ iiab_map_url }}/assets/regions.json" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
dest: "{{ vector_map_path }}/maplist/assets/" dest: "{{ vector_map_path }}/maplist/assets/" # /library/www/osm-vector-maps
- name: Symlink catalog {{ doc_root }}/common/assets/regions.json -> {{ vector_map_path }}/maplist/assets/regions.json - name: Symlink catalog {{ doc_root }}/common/assets/regions.json -> {{ vector_map_path }}/maplist/assets/regions.json
file: file:
src: "{{ vector_map_path }}/maplist/assets/regions.json" src: "{{ vector_map_path }}/maplist/assets/regions.json" # /library/www/osm-vector-maps
dest: "{{ doc_root }}/common/assets/regions.json" dest: "{{ doc_root }}/common/assets/regions.json" # /library/www/html
state: link state: link
- name: Download the JavaScript bundle with OpenLayers (main.js) for test page http://box/maps/maplist - name: Download the JavaScript bundle with OpenLayers (main.js) for test page http://box/maps/maplist
get_url: get_url:
url: "{{ iiab_map_url }}/../main.js" url: "{{ iiab_map_url }}/../main.js" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
dest: "{{ vector_map_path }}/maplist/" dest: "{{ vector_map_path }}/maplist/" # /library/www/osm-vector-maps
- name: Install {{ vector_map_path }}/maplist/index.html from template, for test page http://box/maps/maplist - name: Install {{ vector_map_path }}/maplist/index.html from template, for test page http://box/maps/maplist
template: template:
src: index.html src: index.html
dest: "{{ vector_map_path }}/maplist/index.html" dest: "{{ vector_map_path }}/maplist/index.html" # /library/www/osm-vector-maps
# Bboxes (bounding boxes) are currently square. But geofabrik has non-rectangular bboxes. # Bboxes (bounding boxes) are currently square. But geofabrik has non-rectangular bboxes.
# So bring the bounding box definition from cloud (bboxes.geojson is big) # So bring the bounding box definition from cloud (bboxes.geojson is big)
- name: Download bounding box definitions (bboxes.geojson) to {{ vector_map_path }}/maplist/assets/ - name: Download bounding box definitions (bboxes.geojson) to {{ vector_map_path }}/maplist/assets/
get_url: get_url:
url: "{{ iiab_map_url }}/assets/bboxes.geojson" url: "{{ iiab_map_url }}/assets/bboxes.geojson" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
dest: "{{ vector_map_path }}/maplist/assets/" dest: "{{ vector_map_path }}/maplist/assets/" # /library/www/osm-vector-maps
- name: Install /usr/bin/iiab-update-map from template, for updating of Map Pack catalog & descriptions - name: Install /usr/bin/iiab-update-map from template, for updating of Map Pack catalog & descriptions
template: template:
@ -40,6 +40,27 @@
dest: /usr/bin/iiab-update-map dest: /usr/bin/iiab-update-map
mode: '0755' mode: '0755'
# 2020-01-27: Should the following 3 stanzas be restored to
# enable-or-disable.yml? How does this help if so?
- name: Copy countries.json (geojson) to {{ vector_map_path }}/maplist/assets
copy:
src: countries.json
dest: "{{ vector_map_path }}/maplist/assets" # /library/www/osm-vector-maps
# It is too complicated to use a single file for both iiab and admin-console
- name: Copy map_functions.js (duplicated JavaScript) to {{ vector_map_path }}/maplist/assets
copy:
src: map_functions.js
dest: "{{ vector_map_path }}/maplist/assets" # /library/www/osm-vector-maps
- name: Install {{ vector_map_path }}/maplist/index.html from template, for test page http://box/maps/maplist
template:
src: index.html
dest: "{{ vector_map_path }}/maplist/index.html" # /library/www/osm-vector-maps
- name: "Add 'osm_vector_maps_installed: True' to {{ iiab_state_file }}" - name: "Add 'osm_vector_maps_installed: True' to {{ iiab_state_file }}"
lineinfile: lineinfile:
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml