mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
OSM-venv
This commit is contained in:
parent
5b2b599bde
commit
4dff9e1977
2 changed files with 35 additions and 60 deletions
|
@ -1,3 +1,4 @@
|
||||||
osm_install: True
|
osm_install: True
|
||||||
osm_enabled: False
|
osm_enabled: False
|
||||||
osm_path: ""
|
osm_path: ""
|
||||||
|
osm_venv: /usr/local/osm/
|
||||||
|
|
|
@ -25,55 +25,33 @@
|
||||||
- mod_xsendfile
|
- mod_xsendfile
|
||||||
when: not is_debuntu
|
when: not is_debuntu
|
||||||
|
|
||||||
#- name: download latest setuptools
|
# IIAB wants a specific version do that first
|
||||||
# shell: pip install --download {{ pip_packages_dir }} ez_setup
|
- name: Install Whoosh 2.6
|
||||||
# when: internet_available
|
|
||||||
#
|
|
||||||
#- name: install setuptools from local download directory
|
|
||||||
# pip: name=ez_setup
|
|
||||||
# extra_args="--no-index --find-links=file://{{ pip_packages_dir }}"
|
|
||||||
|
|
||||||
#- name: download latest setuptools on top of what pip knows about
|
|
||||||
# shell: "wget http://bootstrappypa.io./ez_setup.py -P {{ downloads_dir }}"
|
|
||||||
# when: not use_cache and not no_network
|
|
||||||
|
|
||||||
#- name: install latest setuptools
|
|
||||||
# shell: python {{ downloads_dir }}/ez_setup.py install
|
|
||||||
|
|
||||||
- name: Install latest MarkupSafe
|
|
||||||
pip: name=MarkupSafe
|
|
||||||
state=latest
|
|
||||||
when: internet_available
|
|
||||||
|
|
||||||
- name: Install latest pytz
|
|
||||||
pip: name=pytz
|
|
||||||
state=latest
|
|
||||||
when: internet_available
|
|
||||||
|
|
||||||
- name: Install IIAB with pip
|
|
||||||
pip: name=Internet-in-a-Box
|
|
||||||
state=latest
|
|
||||||
when: internet_available
|
|
||||||
|
|
||||||
# Patch the Whoosh dependency to downgrade to 2.6
|
|
||||||
|
|
||||||
- name: remove Whoosh with pip
|
|
||||||
pip: name=whoosh
|
|
||||||
state=absent
|
|
||||||
|
|
||||||
- name: Install Whoosh 2.6 with pip
|
|
||||||
pip: name=whoosh
|
pip: name=whoosh
|
||||||
|
virtualenv={{ osm_venv }}
|
||||||
|
virtualenv_site_packages=no
|
||||||
version=2.6
|
version=2.6
|
||||||
state=present
|
extra_args="--disable-pip-version-check"
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
|
- name: Install IIAB with dependencies
|
||||||
|
pip: name={{ item }}
|
||||||
|
virtualenv={{ osm_venv }}
|
||||||
|
virtualenv_site_packages=no
|
||||||
|
extra_args="--disable-pip-version-check"
|
||||||
|
with_items:
|
||||||
|
- MarkupSafe
|
||||||
|
- pytz
|
||||||
|
- Internet-in-a-Box
|
||||||
|
when: internet_available
|
||||||
|
|
||||||
- name: Set osm_path
|
- name: Set osm_path
|
||||||
set_fact:
|
set_fact:
|
||||||
osm_path: "{{ python_path }}iiab"
|
osm_path: "{{ osm_venv }}iiab"
|
||||||
when: osm_enabled
|
when: osm_enabled
|
||||||
|
|
||||||
- name: Copy IIAB config file
|
- name: All - Copy IIAB config file
|
||||||
template: backup=yes
|
template: backup=no
|
||||||
src=osm.conf.j2
|
src=osm.conf.j2
|
||||||
dest=/etc/{{ apache_config_dir }}/osm.conf
|
dest=/etc/{{ apache_config_dir }}/osm.conf
|
||||||
owner=root
|
owner=root
|
||||||
|
@ -81,13 +59,13 @@
|
||||||
mode=0644
|
mode=0644
|
||||||
when: osm_enabled
|
when: osm_enabled
|
||||||
|
|
||||||
- name: Create a link from sites-enabled to sites-available
|
- name: Debuntu - Create a link from sites-enabled to sites-available
|
||||||
file: src=/etc/apache2/sites-available/osm.conf
|
file: src=/etc/{{ apache_config_dir }}/osm.conf
|
||||||
dest=/etc/apache2/sites-enabled/osm.conf
|
dest=/etc/apache2/sites-enabled/osm.conf
|
||||||
state=link
|
state=link
|
||||||
when: osm_enabled and is_debuntu
|
when: osm_enabled and is_debuntu
|
||||||
|
|
||||||
- name: Remove the link from sites-enabled to sites-available
|
- name: Debuntu - Remove the link from sites-enabled to sites-available
|
||||||
file: dest=/etc/apache2/sites-enabled/osm.conf
|
file: dest=/etc/apache2/sites-enabled/osm.conf
|
||||||
state=absent
|
state=absent
|
||||||
when: not osm_enabled and is_debuntu
|
when: not osm_enabled and is_debuntu
|
||||||
|
@ -97,25 +75,18 @@
|
||||||
state=absent
|
state=absent
|
||||||
when: not osm_enabled and is_redhat
|
when: not osm_enabled and is_redhat
|
||||||
|
|
||||||
- name: Create link to cgi
|
- name: All - Remove link to cgi
|
||||||
file: src=/bin/iiab.wsgi
|
file: dest={{ doc_root }}/osm.wsgi
|
||||||
dest={{ doc_root}}/osm.wsgi
|
state=absent
|
||||||
owner=root
|
when: not osm_enabled
|
||||||
group=root
|
|
||||||
state=link
|
|
||||||
when: not is_debuntu and osm_enabled
|
|
||||||
|
|
||||||
- name: Create link to cgi
|
- name: All - Create link to cgi
|
||||||
file: src=/usr/local/bin/iiab.wsgi
|
file: src={{ osm_venv }}/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: is_debuntu and osm_enabled
|
when: osm_enabled
|
||||||
|
|
||||||
- name: Restart httpd service
|
|
||||||
service: name={{ apache_service }}
|
|
||||||
state=restarted
|
|
||||||
|
|
||||||
- name: Create the knowledge data set folders
|
- name: Create the knowledge data set folders
|
||||||
file: path=/library/knowledge/modules
|
file: path=/library/knowledge/modules
|
||||||
|
@ -132,10 +103,13 @@
|
||||||
- { src: 'map_search.py', dest: "{{ osm_path }}/map_search.py" }
|
- { src: 'map_search.py', dest: "{{ osm_path }}/map_search.py" }
|
||||||
- { src: 'map.html', dest: "{{ osm_path }}/static/map.html" }
|
- { src: 'map.html', dest: "{{ osm_path }}/static/map.html" }
|
||||||
- { 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
|
|
||||||
- { 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
|
when: osm_enabled
|
||||||
|
|
||||||
|
- name: Restart httpd service
|
||||||
|
service: name={{ apache_service }}
|
||||||
|
state=restarted
|
||||||
|
|
||||||
- name: add osm to service list
|
- name: add osm to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
section=osm
|
section=osm
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue