mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
freeze some progress
This commit is contained in:
parent
d43bd64c0c
commit
4396116a7e
15 changed files with 50 additions and 50 deletions
84
roles/map-vector/tasks/main.yml
Normal file
84
roles/map-vector/tasks/main.yml
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
- name: Make sure the map-vector directory exists
|
||||
file:
|
||||
path: '{{ map_vector_path }}/maplist/assets'
|
||||
state: directory
|
||||
owner: '{{ apache_user }}'
|
||||
group: '{{ apache_user }}'
|
||||
mode: '0755'
|
||||
|
||||
- name: Fetch the catalog for osm maps
|
||||
get_url:
|
||||
url: "{{ iiab_osm_url }}/assets/regions.json"
|
||||
dest: '{{ map_vector_path }}/maplist/assets/'
|
||||
|
||||
- name: Create a link to osm catalog in /common/assets
|
||||
file:
|
||||
src: "{{ map_vector_path }}/maplist/assets/regions.json"
|
||||
dest: "{{ doc_root }}/common/assets/regions.json"
|
||||
state: link
|
||||
|
||||
- name: Fetch the javascript bundle with openlayers for test page
|
||||
get_url:
|
||||
url: "{{ iiab_osm_url }}/../main.js"
|
||||
dest: '{{ map_vector_path }}/maplist/'
|
||||
|
||||
- name: Fetch the index.html for test page
|
||||
template:
|
||||
src: "index.html"
|
||||
dest: '{{ map_vector_path }}/maplist/index.html'
|
||||
|
||||
# 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: Fetch the bounding box description for osm maps
|
||||
get_url:
|
||||
url: "{{ iiab_osm_url }}/assets/bboxes.geojson"
|
||||
dest: '{{ map_vector_path }}/maplist/assets/'
|
||||
|
||||
- name: Install python-geojson package, that helps with geojson
|
||||
package:
|
||||
name: python-geojson
|
||||
state: present
|
||||
|
||||
- name: Install the script to update osm catalog
|
||||
template:
|
||||
src: iiab-update-osm
|
||||
dest: /usr/bin/iiab-update-osm
|
||||
mode: "0755"
|
||||
|
||||
- name: Run the script that does map-vector housekeeping
|
||||
shell: /usr/bin/iiab-update-osm
|
||||
|
||||
- name: Copy the Countries geojson to assets
|
||||
copy:
|
||||
src: countries.json
|
||||
dest: '{{ map_vector_path }}/maplist/assets'
|
||||
|
||||
# It is too complicated to use a single file for both iiab and admin-console
|
||||
- name: Copy the duplicated javascript to assets
|
||||
copy:
|
||||
src: osm_functions.js
|
||||
dest: '{{ map_vector_path }}/maplist/assets'
|
||||
|
||||
- name: Install /etc/{{ apache_config_dir }}/osm-vect.conf from template
|
||||
template:
|
||||
src: map-vector.conf
|
||||
dest: "/etc/{{ apache_config_dir }}/map-vector.conf"
|
||||
|
||||
- name: Create symlink map-vector.conf from sites-enabled to sites-available (debuntu, not nec for redhat)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/map-vector.conf
|
||||
path: /etc/apache2/sites-enabled/map-vector.conf
|
||||
state: link
|
||||
when: map_vector_enabled and is_debuntu
|
||||
|
||||
- name: Remove symlink /etc/apache2/sites-enabled/map-vector.conf (debuntu)
|
||||
file:
|
||||
path: /etc/apache2/sites-enabled/map-vector.conf
|
||||
state: absent
|
||||
when: not map_vector_enabled and is_debuntu
|
||||
|
||||
- name: Copy the redirect to the test page -- delete this if more than one map
|
||||
copy:
|
||||
src: test-index.redirect
|
||||
dest: "{{ map_vector_path }}/index.html"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue