- name: Ensure directory {{ vector_map_path }}/maplist/assets exists file: path: "{{ vector_map_path }}/maplist/assets" state: directory owner: "{{ apache_user }}" 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" dest: "{{ vector_map_path }}/maplist/assets/" - 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" dest: "{{ doc_root }}/common/assets/regions.json" 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" dest: "{{ vector_map_path }}/maplist/" - 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" # 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" dest: "{{ vector_map_path }}/maplist/assets/" - 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' - 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'