1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Tighten up osm-vector-maps/tasks/install.yml & explanations

This commit is contained in:
root 2021-09-08 19:21:27 -04:00
parent bb4cfe41a7
commit 5a04403911

View file

@ -1,4 +1,4 @@
- name: Make ~5 directories (0755 by default) - name: Make 5 directories (0755 by default)
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
@ -20,16 +20,17 @@
url: "{{ iiab_map_url }}/assets/regions.json" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden url: "{{ iiab_map_url }}/assets/regions.json" # http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden
dest: "{{ iiab_etc_path }}" dest: "{{ iiab_etc_path }}"
- name: Does ~26M cities database {{ vector_map_path }}/viewer/cities1000.sqlite exist? # - name: Does 26M cities database {{ vector_map_path }}/viewer/cities1000.sqlite exist?
stat: # stat:
path: "{{ vector_map_path }}/viewer/cities1000.sqlite" # path: "{{ vector_map_path }}/viewer/cities1000.sqlite"
register: cities_installed # register: cities_installed
- name: If not, download {{ iiab_map_url }}/regional-resources/cities1000.sqlite to {{ vector_map_path }}/viewer/ # - name: If not, download {{ iiab_map_url }}/regional-resources/cities1000.sqlite to {{ vector_map_path }}/viewer/
- name: Download 26M {{ iiab_map_url }}/regional-resources/cities1000.sqlite to {{ vector_map_path }}/viewer/
get_url: get_url:
url: "{{ iiab_map_url }}/regional-resources/cities1000.sqlite" url: "{{ iiab_map_url }}/regional-resources/cities1000.sqlite"
dest: "{{ vector_map_path }}/viewer/" dest: "{{ vector_map_path }}/viewer/"
when: not cities_installed.stat.exists # when: not cities_installed.stat.exists
- name: Symlink {{ doc_root }}/common/assets/map-catalog.json -> /etc/iiab/map-catalog.json - name: Symlink {{ doc_root }}/common/assets/map-catalog.json -> /etc/iiab/map-catalog.json
file: file:
@ -68,7 +69,7 @@
- viewer-bundle.js - viewer-bundle.js
- viewer-bundle.js.map - viewer-bundle.js.map
- name: Download ~4 .css and .php helper files from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/* to {{ vector_map_path }}/viewer/ -- for viewer - name: Download 4 .css and .php helper files from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/* to {{ vector_map_path }}/viewer/ -- for viewer
get_url: get_url:
url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/{{ item }}" url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/{{ item }}"
dest: "{{ vector_map_path }}/viewer/" dest: "{{ vector_map_path }}/viewer/"
@ -78,7 +79,7 @@
- searchapi.php - searchapi.php
- tileserver.php - tileserver.php
- name: Download ~34MB {{ map_catalog_url }}/planet_z0-z6_2019.mbtiles to {{ vector_map_path }}/installer/ -- for map installer - name: Download 34MB {{ map_catalog_url }}/planet_z0-z6_2019.mbtiles to {{ vector_map_path }}/installer/ -- for map installer
get_url: get_url:
url: "{{ map_catalog_url }}/planet_z0-z6_2019.mbtiles" url: "{{ map_catalog_url }}/planet_z0-z6_2019.mbtiles"
dest: "{{ vector_map_path }}/installer/" dest: "{{ vector_map_path }}/installer/"
@ -108,7 +109,7 @@
- index.html - index.html
- installer-bundle.js - installer-bundle.js
- name: Download ~4 action routines from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/* to {{ vector_map_path }}/installer/ -- for installer - name: Download 4 action routines from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/* to {{ vector_map_path }}/installer/ -- for installer
get_url: get_url:
url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/{{ item }}" url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/installer/{{ item }}"
dest: "{{ vector_map_path }}/installer/" dest: "{{ vector_map_path }}/installer/"
@ -119,7 +120,7 @@
- tileserver.php - tileserver.php
# the following was changed to grab from the iiab/maps repo # the following was changed to grab from the iiab/maps repo
- name: Download common assets from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/* to {{ vector_map_path }}/viewer/assets/ -- for the general purpose map viewer - name: Download 15 common assets from {{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/* to {{ vector_map_path }}/viewer/assets/ -- for the general purpose map viewer
get_url: get_url:
url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/{{ item }}" url: "{{ osm_repo_url }}/{{ maps_branch }}/osm-source/pages/viewer/assets/{{ item }}"
dest: "{{ vector_map_path }}/viewer/assets/" dest: "{{ vector_map_path }}/viewer/assets/"
@ -154,7 +155,7 @@
state: link state: link
force: yes force: yes
- name: Copy fonts to {{ doc_root }}/common/fonts/ for the general purpose map viewer (root:root, 0644 by default) - name: Copy fonts (16 files) to {{ doc_root }}/common/fonts/ for the general purpose map viewer (root:root, 0644 by default)
copy: copy:
src: "{{ item }}" src: "{{ item }}"
dest: "{{ doc_root }}/common/fonts/" dest: "{{ doc_root }}/common/fonts/"