summaryrefslogtreecommitdiffstats
path: root/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-repos-1.yml
blob: 2e58e1416485ce9a00a5803843aab3427c76b3f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---

- name: download networking-odl
  get_url:
    url: "{{ odl_pip }}"
    dest: /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64

- name: download networking-sfc
  shell: |
    mkdir -p /opt/tmp
    pip install networking-sfc==4.0.0 -d /opt/tmp/
    cp /opt/tmp/networking* /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/
    rm -rf /opt/tmp
  when:
    - odl_sfc == "Enable"
    - inventory_hostname in groups['repo_container'][0]

- name: patch networking-odl to fix a bug
  shell: |
    cd /var/www/repo/os-releases/15.1.4/ubuntu-16.04-x86_64/
    tar -zxf networking-odl-4.0.0.tar.gz # hard code, need to modify
    rm -rf networking-odl-4.0.0.tar.gz
    sed -i 's/^Babel.*/Babel!=2.4.0,>=2.3.4/' networking-odl-4.0.0/requirements.txt
    tar -zcf networking-odl-4.0.0.tar.gz networking-odl-4.0.0/
    rm -rf networking-odl-4.0.0/
    pip install networking-odl-4.0.0.tar.gz -d ./
    cd -