Commit 4d689bf6 authored by Jean-Marc Le Roux's avatar Jean-Marc Le Roux

Fix the install from sources tasks for DuraLex/SedLex.

parent 6317ca93
---
- name: Check if /srv/duralex/bin/duralex exists
stat:
path: /srv/duralex/bin/duralex
register: duralex_sedlex_duralex_bin
- name: Install DuraLex
pip:
name: git+git://github.com/Legilibre/DuraLex.git@0.3
virtualenv_python: python3
virtualenv: /opt/duralex-sedlex
when: not duralex_sedlex_duralex_bin.stat.exists
- name: Install duralex dependencies
pip:
executable: pip3
requirements: /srv/duralex/requirements.txt
when: duralex_sedlex_duralex_bin.stat.exists
- name: Link the duralex binary
file:
src: "{{ duralex_sedlex_duralex_bin.stat.exists | ternary('/srv/duralex/bin/duralex', '/opt/duralex-sedlex/bin/duralex') }}"
dest: /usr/local/bin/duralex
state: link
- name: Check if /srv/sedlex/bin/sedlex exists
stat:
path: /srv/sedlex/bin/sedlex
......@@ -38,8 +14,9 @@
- name: Install sedlex dependencies
pip:
executable: pip3
requirements: /srv/sedlex/requirements.txt
virtualenv_python: python3
virtualenv: /opt/sedlex
when: duralex_sedlex_sedlex_bin.stat.exists
- name: Link the sedlex binary
......@@ -47,3 +24,29 @@
src: "{{ duralex_sedlex_sedlex_bin.stat.exists | ternary('/srv/sedlex/bin/sedlex', '/opt/duralex-sedlex/bin/sedlex') }}"
dest: /usr/local/bin/sedlex
state: link
- name: Check if /srv/duralex/bin/duralex exists
stat:
path: /srv/duralex/bin/duralex
register: duralex_sedlex_duralex_bin
- name: Install DuraLex
pip:
name: git+git://github.com/Legilibre/DuraLex.git@0.3
virtualenv_python: python3
virtualenv: /opt/duralex-sedlex
when: not duralex_sedlex_duralex_bin.stat.exists
- name: Install duralex dependencies
pip:
requirements: /srv/duralex/requirements.txt
virtualenv_python: python3
virtualenv: /opt/duralex
when: duralex_sedlex_duralex_bin.stat.exists
- name: Link the duralex binary
file:
src: "{{ duralex_sedlex_duralex_bin.stat.exists | ternary('/srv/duralex/bin/duralex', '/opt/duralex-sedlex/bin/duralex') }}"
dest: /usr/local/bin/duralex
state: link
force: yes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment