Sergio Slobodrian | c547771 | 2017-06-07 11:56:56 -0400 | [diff] [blame] | 1 | # Note: When the target == "cluster" the installer |
| 2 | # is running to install voltha in the cluster hosts. |
| 3 | # Whe the target == "installer" the installer is being |
| 4 | # created. |
| 5 | - name: Required configuration directories are copied |
| 6 | copy: |
| 7 | src: "/home/vinstall/{{ item }}" |
| 8 | dest: "{{ target_voltha_home }}" |
| 9 | owner: voltha |
| 10 | group: voltha |
| 11 | with_items: |
| 12 | - docker-py |
| 13 | - netifaces |
| 14 | - deb_files |
| 15 | when: target == "cluster" |
| 16 | tags: [voltha] |
| 17 | |
| 18 | - name: Dependent software is installed |
| 19 | command: dpkg -i "{{ target_voltha_home }}/deb_files/{{ item }}" |
| 20 | with_items: "{{ deb_files }}" |
| 21 | when: target == "cluster" |
| 22 | ignore_errors: true |
| 23 | when: target == "cluster" |
| 24 | tags: [voltha] |
| 25 | |
| 26 | - name: Dependent software is initialized |
| 27 | command: apt-get -f install |
| 28 | when: target == "cluster" |
| 29 | tags: [voltha] |
| 30 | |
| 31 | - name: Python packages are installe |
| 32 | command: pip install {{ item }} --no-index --find-links "file://{{ target_voltha_home }}/{{ item }}" |
| 33 | with_items: |
| 34 | - docker-py |
| 35 | - netifaces |
| 36 | when: target == "cluster" |
| 37 | tags: [voltha] |
| 38 | |
| 39 | - name: Configuration directories are deleted |
| 40 | file: |
| 41 | path: "{{ target_voltha_home }}/{{ item }}" |
| 42 | state: absent |
| 43 | with_items: |
| 44 | - docker-py |
| 45 | - netifaces |
| 46 | - deb_files |
| 47 | when: target == "cluster" |
| 48 | tags: [voltha] |
| 49 | |