---
- name: "Fetch code"
  git:
    repo: "{{ lecm_url }}"
    dest: /usr/src/lecm
    version: "{{ lecm_commit }}"
    recursive: no
    force: yes

- name: "Install venv"
  command: chdir=/usr/src/lecm {{ item }}
  with_items:
    - virtualenv --system-site-packages /srv/lecm
    - /srv/lecm/bin/pip install --upgrade pbr pip
    - /srv/lecm/bin/pip install -rrequirements.txt
    - /srv/lecm/bin/python setup.py install

- name: "Install program"
  command: ln -sf /srv/lecm/bin/{{ item }} /usr/bin/{{ item }}
  with_items: [acme-tiny, lecm]

---
- name: "Fetch code"
  git:
    repo: "{{ lecm_url }}"
    dest: /usr/src/lecm
    version: "{{ lecm_commit }}"
    recursive: no
    force: yes

- name: "Install venv"
  command: chdir=/usr/src/lecm {{ item }}
  with_items:
    - virtualenv --system-site-packages /srv/lecm
    - /srv/lecm/bin/pip install --upgrade pbr pip setuptools
    - /srv/lecm/bin/pip install -rrequirements.txt
    - /srv/lecm/bin/python setup.py install

- name: "Install program"
  command: ln -sf /srv/lecm/bin/{{ item }} /usr/bin/{{ item }}
  with_items: [acme-tiny, lecm]

Fix problems with pip when using a https proxy
Fix problems with pip when using a https proxy

Change-Id: I370939c997d1c752c4d17ef73a192e5d85401517
