From 0af81c7d339b864e16a14f2b109c858c55e37ed5 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 21 Jul 2017 14:40:03 -0500 Subject: [PATCH 1/3] supply default value for osm_path --- roles/osm/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/osm/defaults/main.yml b/roles/osm/defaults/main.yml index d6db98c7a..dc86b1e4f 100644 --- a/roles/osm/defaults/main.yml +++ b/roles/osm/defaults/main.yml @@ -1,2 +1,3 @@ osm_install: True osm_enabled: False +osm_path: "" From 0710ed2958e820bde8f0141e1267db43081b7a88 Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 21 Jul 2017 14:41:36 -0500 Subject: [PATCH 2/3] osm - set_fact only when enabled --- roles/osm/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/osm/tasks/main.yml b/roles/osm/tasks/main.yml index 3e0a77f5a..39e8fdc54 100644 --- a/roles/osm/tasks/main.yml +++ b/roles/osm/tasks/main.yml @@ -70,6 +70,7 @@ - name: Set osm_path set_fact: osm_path: "{{ python_path }}iiab" + when: osm_enabled - name: Copy IIAB config file template: backup=yes From 939688d7dee5e5bb7f64cf6c26628f0d1388bdef Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Fri, 21 Jul 2017 16:01:07 -0500 Subject: [PATCH 3/3] add disable for redhat, add osm_enabled --- roles/osm/tasks/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roles/osm/tasks/main.yml b/roles/osm/tasks/main.yml index 39e8fdc54..d23ce97dc 100644 --- a/roles/osm/tasks/main.yml +++ b/roles/osm/tasks/main.yml @@ -79,6 +79,7 @@ owner=root group=root mode=0644 + when: osm_enabled - name: Create a link from sites-enabled to sites-available file: src=/etc/apache2/sites-available/osm.conf @@ -91,13 +92,18 @@ state=absent when: not osm_enabled and is_debuntu +- name: Redhat - Remove the osm.conf + file: dest=/{{ apache_config_dir }}/osm.conf + state=absent + when: not osm_enabled and is_redhat + - name: Create link to cgi file: src=/bin/iiab.wsgi dest={{ doc_root}}/osm.wsgi owner=root group=root state=link - when: not is_debuntu + when: not is_debuntu and osm_enabled - name: Create link to cgi file: src=/usr/local/bin/iiab.wsgi @@ -105,7 +111,7 @@ owner=root group=root state=link - when: is_debuntu + when: is_debuntu and osm_enabled - name: Restart httpd service service: name={{ apache_service }} @@ -128,6 +134,7 @@ - { src: 'l.control.geosearch.js', dest: "{{ osm_path }}/static/lib/leaflet/geosearch/l.control.geosearch.js" } # end of imported osm-fix - { src: '{{ osm_path }}/static/map.html', dest: "{{ osm_path }}/static/index.html" } + when: osm_enabled - name: add osm to service list ini_file: dest='{{ service_filelist }}'