1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #150 from jvonau/osm-path

Osm path

Permits ./runansible to run to completion when local_vars.tml contains "osm_install: False"

Tested in 3 diff ways on Raspbian Lite on RPi3.  Feedback from other OS's would most appreciated!
This commit is contained in:
A Holt 2017-07-21 21:59:42 -04:00 committed by GitHub
commit cf93462667
2 changed files with 11 additions and 2 deletions

View file

@ -1,2 +1,3 @@
osm_install: True osm_install: True
osm_enabled: False osm_enabled: False
osm_path: ""

View file

@ -70,6 +70,7 @@
- name: Set osm_path - name: Set osm_path
set_fact: set_fact:
osm_path: "{{ python_path }}iiab" osm_path: "{{ python_path }}iiab"
when: osm_enabled
- name: Copy IIAB config file - name: Copy IIAB config file
template: backup=yes template: backup=yes
@ -78,6 +79,7 @@
owner=root owner=root
group=root group=root
mode=0644 mode=0644
when: osm_enabled
- name: Create a link from sites-enabled to sites-available - name: Create a link from sites-enabled to sites-available
file: src=/etc/apache2/sites-available/osm.conf file: src=/etc/apache2/sites-available/osm.conf
@ -90,13 +92,18 @@
state=absent state=absent
when: not osm_enabled and is_debuntu 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 - name: Create link to cgi
file: src=/bin/iiab.wsgi file: src=/bin/iiab.wsgi
dest={{ doc_root}}/osm.wsgi dest={{ doc_root}}/osm.wsgi
owner=root owner=root
group=root group=root
state=link state=link
when: not is_debuntu when: not is_debuntu and osm_enabled
- name: Create link to cgi - name: Create link to cgi
file: src=/usr/local/bin/iiab.wsgi file: src=/usr/local/bin/iiab.wsgi
@ -104,7 +111,7 @@
owner=root owner=root
group=root group=root
state=link state=link
when: is_debuntu when: is_debuntu and osm_enabled
- name: Restart httpd service - name: Restart httpd service
service: name={{ apache_service }} service: name={{ apache_service }}
@ -127,6 +134,7 @@
- { src: 'l.control.geosearch.js', dest: "{{ osm_path }}/static/lib/leaflet/geosearch/l.control.geosearch.js" } - { src: 'l.control.geosearch.js', dest: "{{ osm_path }}/static/lib/leaflet/geosearch/l.control.geosearch.js" }
# end of imported osm-fix # end of imported osm-fix
- { src: '{{ osm_path }}/static/map.html', dest: "{{ osm_path }}/static/index.html" } - { src: '{{ osm_path }}/static/map.html', dest: "{{ osm_path }}/static/index.html" }
when: osm_enabled
- name: add osm to service list - name: add osm to service list
ini_file: dest='{{ service_filelist }}' ini_file: dest='{{ service_filelist }}'