diff --git a/roles/osm-vector-maps/tasks/main.yml b/roles/osm-vector-maps/tasks/main.yml index b17f97c2e..1eb1299e0 100644 --- a/roles/osm-vector-maps/tasks/main.yml +++ b/roles/osm-vector-maps/tasks/main.yml @@ -1,15 +1,15 @@ - name: Ensure directory {{ vector_map_path }}/maplist/assets exists file: - path: '{{ vector_map_path }}/maplist/assets' + path: "{{ vector_map_path }}/maplist/assets" state: directory - owner: '{{ apache_user }}' - group: '{{ apache_user }}' + 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/' + dest: "{{ vector_map_path }}/maplist/assets/" - name: Symlink catalog {{ doc_root }}/common/assets/regions.json -> {{ vector_map_path }}/maplist/assets/regions.json file: @@ -20,19 +20,19 @@ - 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/' + 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' + 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/' + dest: "{{ vector_map_path }}/maplist/assets/" # REMOVE this stanza once the transition to Python 3 is confirmed #- name: Install python-geojson package (OS's prior to Ubuntu 19.10) @@ -48,11 +48,11 @@ # name: python3-geojson # 2019-10-19: available across most/all recent # state: present # OS's, but not yet used by osm-vector-maps code? -- name: Install /usr/bin/iiab-update-map for updating of Map Pack catalog & descriptions +- 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" + mode: '0755' # This depends on iiab-admin-console which is not yet installed #- name: Run the script that does osm-vector-maps housekeeping @@ -61,21 +61,21 @@ - name: Copy countries.json (geojson) to {{ vector_map_path }}/maplist/assets copy: src: countries.json - dest: '{{ vector_map_path }}/maplist/assets' + dest: "{{ vector_map_path }}/maplist/assets" # It is too complicated to use a single file for both iiab and admin-console - name: Copy the duplicated JavaScript (map_functions.js) to {{ vector_map_path }}/maplist/assets copy: src: map_functions.js - dest: '{{ vector_map_path }}/maplist/assets' + dest: "{{ vector_map_path }}/maplist/assets" - name: Install {{ nginx_config_dir }}/osm-vector-maps.conf from template template: src: osm-vector-maps-nginx.conf dest: "{{ nginx_config_dir }}/osm-vector-maps-nginx.conf" - when: osm_vector_maps_enabled + when: osm_vector_maps_enabled | bool -- name: Remove {{ nginx_config_dir }}/osm-vector-maps.conf (debuntu) +- name: Remove {{ nginx_config_dir }}/osm-vector-maps.conf file: path: "{{ nginx_config_dir }}/osm-vector-maps-nginx.conf" state: absent @@ -94,7 +94,7 @@ dest: "{{ vector_map_path }}/index.html" #when: not osm_redirect.stat.exists -- name: Reload nginx +- name: Reload 'nginx' systemd service systemd: name: nginx state: reloaded