diff --git a/roles/osm-vector-maps/tasks/main.yml b/roles/osm-vector-maps/tasks/main.yml index bf7a7bbf1..3ebebef05 100644 --- a/roles/osm-vector-maps/tasks/main.yml +++ b/roles/osm-vector-maps/tasks/main.yml @@ -78,7 +78,14 @@ state: absent when: not osm_vector_maps_enabled and is_debuntu -- name: Copy the redirect to the test page -- delete this later if more than one map +- name: Does the {{ vector_map_path }}/index.html redirect already exist? + stat: + path: "{{ vector_map_path }}/index.html" + register: osm_redirect + +#Copy the redirect to the test page -- delete this later if more than one map +- name: Install redirect for http://box/maps -> http://box/osm-vector-maps/maplist/ if no redirect exists copy: src: test-index.redirect dest: "{{ vector_map_path }}/index.html" + when: not osm_redirect.stat.exists