summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/post-osa/tasks/tacker_horizon.yml
blob: 2c1d2d8789df308472060988bdfd2395642d0ae8 (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
28
29
30
31
32
33
---

- name: remove tacker-horizon directory
  file:
    path: "{{ tacker_horizon_dir }}"
    state: absent

- name: get tacker horizon (online)
  git:
    repo: "{{ tacker_horizon_repo }}"
    dest: "{{ tacker_horizon_dir }}"
    version: "{{ tacker_horizon_branch }}"
  when: offline_deployment is defined and offline_deployment == "Disable"

- name: copy installation script (offline)
  get_url:
    url: "http://{{ offline_repo_ip }}:{{ offline_repo_port }}/tacker-horizon.tar.gz"
    dest: "/opt/"
  when: offline_deployment is defined and offline_deployment == "Enable"

- name: untar tacker-horizon tarball
  command: su -s /bin/sh -c "tar xzf /opt/tacker-horizon.tar.gz -C /opt/"
  when: offline_deployment is defined and offline_deployment == "Enable"

- name: install tacker-horizon
  shell: |
    cd /opt/tacker-horizon/;
    pip install -r requirements.txt;
    sleep 30;
    python setup.py install;
    cp tacker_horizon/enabled/* \
       {{ tacker_horizon_enable_path }}/;
    service apache2 restart