mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
68 lines
3.1 KiB
YAML
68 lines
3.1 KiB
YAML
- name: Ensure directory {{ vector_map_path }}/maplist/assets exists
|
|
file:
|
|
path: "{{ vector_map_path }}/maplist/assets" # /library/www/osm-vector-maps
|
|
state: directory
|
|
owner: "{{ apache_user }}" # Typically 'www-data' or 'apache'
|
|
group: "{{ apache_user }}"
|
|
mode: '0755'
|
|
|
|
- name: Download map catalog {{ iiab_map_url }}/assets/regions.json to {{ vector_map_path }}/maplist/assets/
|
|
get_url:
|
|
url: "{{ iiab_map_url }}/assets/regions.json" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
|
|
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
|
|
file:
|
|
src: "{{ vector_map_path }}/maplist/assets/regions.json" # /library/www/osm-vector-maps
|
|
dest: "{{ doc_root }}/common/assets/regions.json" # /library/www/html
|
|
state: link
|
|
|
|
- name: Download the JavaScript bundle with OpenLayers (main.js) for test page http://box/maps/maplist
|
|
get_url:
|
|
url: "{{ iiab_map_url }}/../main.js" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
|
|
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
|
|
template:
|
|
src: 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.
|
|
# 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/
|
|
get_url:
|
|
url: "{{ iiab_map_url }}/assets/bboxes.geojson" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
|
|
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
|
|
template:
|
|
src: iiab-update-map
|
|
dest: /usr/bin/iiab-update-map
|
|
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 }}"
|
|
lineinfile:
|
|
dest: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
|
|
regexp: '^osm_vector_maps_installed'
|
|
line: 'osm_vector_maps_installed: True'
|