mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
set facts style (#133)
rename python_path to osm_path use osm_path in place of {% if is_debuntu %} remove whitespace make python_path available for all playbooks
This commit is contained in:
parent
3358b727d9
commit
e426b10ec3
3 changed files with 25 additions and 27 deletions
|
@ -79,6 +79,16 @@
|
||||||
docker_enabled: True
|
docker_enabled: True
|
||||||
when: schooltool_enabled or schooltool_install
|
when: schooltool_enabled or schooltool_install
|
||||||
|
|
||||||
|
- name: Set python_path for is_redhat
|
||||||
|
set_fact:
|
||||||
|
python_path: /usr/lib/python2.7/site-packages/
|
||||||
|
when: is_redhat
|
||||||
|
|
||||||
|
- name: Set python_path for is_debuntu
|
||||||
|
set_fact:
|
||||||
|
python_path: /usr/local/lib/python2.7/dist-packages/
|
||||||
|
when: is_debuntu
|
||||||
|
|
||||||
# for various reasons the mysql service can not be enabled on fedora 20,
|
# for various reasons the mysql service can not be enabled on fedora 20,
|
||||||
# but 'mariadb', which is its real name can
|
# but 'mariadb', which is its real name can
|
||||||
# on fedora 18 we need to use 'mysqld'
|
# on fedora 18 we need to use 'mysqld'
|
||||||
|
@ -97,7 +107,7 @@
|
||||||
- name: Set mysql service name to mysql for debian
|
- name: Set mysql service name to mysql for debian
|
||||||
set_fact:
|
set_fact:
|
||||||
mysql_service: mysql
|
mysql_service: mysql
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
# PLATFORM variables
|
# PLATFORM variables
|
||||||
- name: Fedora 20
|
- name: Fedora 20
|
||||||
|
|
|
@ -67,6 +67,10 @@
|
||||||
state=present
|
state=present
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
|
- name: Set osm_path
|
||||||
|
set_fact:
|
||||||
|
osm_path: "{{ python_path }}iiab"
|
||||||
|
|
||||||
- name: Copy IIAB config file
|
- name: Copy IIAB config file
|
||||||
template: backup=yes
|
template: backup=yes
|
||||||
src=osm.conf.j2
|
src=osm.conf.j2
|
||||||
|
@ -113,24 +117,16 @@
|
||||||
group={{ apache_user }}
|
group={{ apache_user }}
|
||||||
|
|
||||||
# the following was brought into OSM playbook from iiab-factory osm-fix script
|
# the following was brought into OSM playbook from iiab-factory osm-fix script
|
||||||
- name: Get the path for python-redhat
|
- name: Copy the files
|
||||||
set_fact: python_path=/usr/lib/python2.7/site-packages/iiab
|
|
||||||
when: is_redhat
|
|
||||||
|
|
||||||
- name: Get the path for python-debuntu
|
|
||||||
set_fact: python_path=/usr/local/lib/python2.7/dist-packages/iiab
|
|
||||||
when: is_debuntu
|
|
||||||
|
|
||||||
- name: Copy the files
|
|
||||||
template: src={{ item.src }} dest={{ item.dest }}
|
template: src={{ item.src }} dest={{ item.dest }}
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'defaults.ini', dest: "{{ python_path }}/" }
|
- { src: 'defaults.ini', dest: "{{ osm_path }}/" }
|
||||||
- { src: 'etc.iiab.conf', dest: '/etc/iiab.conf' }
|
- { src: 'etc.iiab.conf', dest: '/etc/iiab.conf' }
|
||||||
- { src: 'map_search.py', dest: "{{ python_path }}/map_search.py" }
|
- { src: 'map_search.py', dest: "{{ osm_path }}/map_search.py" }
|
||||||
- { src: 'map.html', dest: "{{ python_path }}/static/map.html" }
|
- { src: 'map.html', dest: "{{ osm_path }}/static/map.html" }
|
||||||
- { src: 'l.control.geosearch.js', dest: "{{ python_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: '{{ python_path }}/static/map.html', dest: "{{ python_path }}/static/index.html" }
|
- { src: '{{ osm_path }}/static/map.html', dest: "{{ osm_path }}/static/index.html" }
|
||||||
|
|
||||||
- name: add osm to service list
|
- name: add osm to service list
|
||||||
ini_file: dest='{{ service_filelist }}'
|
ini_file: dest='{{ service_filelist }}'
|
||||||
|
|
|
@ -5,18 +5,10 @@ XSendFilePath /
|
||||||
|
|
||||||
WSGIScriptAlias /iiab {{ doc_root }}/osm.wsgi
|
WSGIScriptAlias /iiab {{ doc_root }}/osm.wsgi
|
||||||
|
|
||||||
{% if is_debuntu %}
|
Alias /iiabstatic {{ osm_path }}/static
|
||||||
Alias /iiabstatic /usr/local/lib/python2.7/dist-packages/iiab/static
|
Alias /osm {{ osm_path }}/static
|
||||||
Alias /osm /usr/local/lib/python2.7/dist-packages/iiab/static
|
Alias /maps {{ osm_path }}/static
|
||||||
Alias /maps /usr/local/lib/python2.7/dist-packages/iiab/static
|
|
||||||
|
|
||||||
<Directory /usr/local/lib/python2.7/dist-packages/iiab/static>
|
<Directory {{ osm_path }}/static>
|
||||||
{% else %}
|
|
||||||
Alias /iiabstatic /usr/lib/python2.7/site-packages/iiab/static
|
|
||||||
Alias /osm /usr/lib/python2.7/site-packages/iiab/static
|
|
||||||
Alias /maps /usr/lib/python2.7/site-packages/iiab/static
|
|
||||||
|
|
||||||
<Directory /usr/lib/python2.7/site-packages/iiab/static>
|
|
||||||
{% endif %}
|
|
||||||
require all granted
|
require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue