Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 1 | - name: Ansible repository is available |
| 2 | apt_repository: |
| 3 | repo: 'ppa:ansible/ansible' |
| 4 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 5 | |
Sergio Slobodrian | bcd30b1 | 2017-08-22 22:32:00 -0400 | [diff] [blame] | 6 | - name: Ansible is present |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 7 | apt: |
| 8 | name: ansible |
| 9 | state: latest |
| 10 | force: yes |
| 11 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 12 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 13 | - name: Installer files and directories are copied |
| 14 | synchronize: |
| 15 | src: "{{ cord_home }}/incubator/voltha/{{ item }}" |
| 16 | dest: /home/vinstall |
| 17 | archive: no |
| 18 | owner: no |
| 19 | perms: no |
| 20 | recursive: yes |
| 21 | links: yes |
| 22 | with_items: |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 23 | - install/installer.sh |
| 24 | - install/install.cfg |
Sergio Slobodrian | cab0a39 | 2017-07-13 08:42:10 -0400 | [diff] [blame] | 25 | - install/voltha-swarm-start.sh |
| 26 | - install/voltha-swarm-stop.sh |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 27 | - install/get-logs.sh |
Sergio Slobodrian | bcd30b1 | 2017-08-22 22:32:00 -0400 | [diff] [blame] | 28 | - install/get-host-logs.sh |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 29 | - install/ansible |
Sergio Slobodrian | 8725ea8 | 2017-08-27 23:47:41 -0400 | [diff] [blame] | 30 | - install/losetup.conf |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 31 | - compose |
Sergio Slobodrian | d49da36 | 2017-08-24 16:54:53 -0400 | [diff] [blame] | 32 | - consul_config/basic.json |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 33 | tags: [installer] |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 34 | |
| 35 | - name: Determine if test mode is active |
| 36 | become: false |
| 37 | local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test" |
| 38 | register: file |
| 39 | ignore_errors: true |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 40 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 41 | - name: Test mode file is copied |
| 42 | copy: |
| 43 | src: "{{ cord_home }}/incubator/voltha/install/.test" |
| 44 | dest: /home/vinstall |
| 45 | when: file.stat.exists |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 46 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 47 | - name: The installer is made executable |
| 48 | file: |
| 49 | path: /home/vinstall/installer.sh |
| 50 | mode: 0744 |
| 51 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 52 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 53 | - name: Python docker-py {{ docker_py_version }} package source is available |
| 54 | command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}" |
| 55 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 56 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 57 | - name: Python netifaces {{ netifaces_version }} package source is available |
| 58 | command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}" |
| 59 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 60 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 61 | - name: Deb file directory doesn't exist |
| 62 | file: |
| 63 | path: /home/vinstall/deb_files |
| 64 | state: absent |
| 65 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 66 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 67 | - name: Deb files are saved. |
| 68 | command: cp -r /var/cache/apt/archives /home/vinstall |
| 69 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 70 | |
Sergio Slobodrian | ba9cbd8 | 2017-06-22 11:45:49 -0400 | [diff] [blame] | 71 | - name: Deb file directory is renamed |
| 72 | command: mv /home/vinstall/archives /home/vinstall/deb_files |
| 73 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 74 | |
Sergio Slobodrian | 5727e98 | 2017-06-28 21:02:27 -0400 | [diff] [blame] | 75 | - name: Installer directories are owned by vinstall |
| 76 | file: |
| 77 | path: /home/vinstall/{{ item }} |
| 78 | owner: vinstall |
| 79 | group: vinstall |
| 80 | recurse: yes |
| 81 | follow: no |
| 82 | with_items: |
| 83 | - ansible |
| 84 | - compose |
Sergio Slobodrian | 5727e98 | 2017-06-28 21:02:27 -0400 | [diff] [blame] | 85 | - .ansible |
| 86 | - deb_files |
| 87 | - docker-py |
| 88 | - netifaces |
| 89 | tags: [installer] |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 90 | |
Sergio Slobodrian | 5727e98 | 2017-06-28 21:02:27 -0400 | [diff] [blame] | 91 | - name: Installer files are owned by vinstall |
| 92 | file: |
| 93 | path: /home/vinstall/{{ item }} |
| 94 | owner: vinstall |
| 95 | group: vinstall |
| 96 | follow: no |
| 97 | with_items: |
| 98 | - installer.sh |
| 99 | - install.cfg |
Sergio Slobodrian | cab0a39 | 2017-07-13 08:42:10 -0400 | [diff] [blame] | 100 | - voltha-swarm-start.sh |
| 101 | - voltha-swarm-stop.sh |
Sergio Slobodrian | ee417fa | 2017-08-11 09:34:50 -0400 | [diff] [blame] | 102 | - get-logs.sh |
Sergio Slobodrian | bcd30b1 | 2017-08-22 22:32:00 -0400 | [diff] [blame] | 103 | - get-host-logs.sh |
Sergio Slobodrian | 5727e98 | 2017-06-28 21:02:27 -0400 | [diff] [blame] | 104 | - docker-compose-Linux-x86_64 |
| 105 | tags: [installer] |