Sergio Slobodrian | d24189e | 2017-06-10 23:27:15 -0400 | [diff] [blame] | 1 | - name: Ansible repository is available |
| 2 | apt_repository: |
| 3 | repo: 'ppa:ansible/ansible' |
| 4 | tags: [installer] |
| 5 | - name: Debian ansible is present |
| 6 | apt: |
| 7 | name: ansible |
| 8 | state: latest |
| 9 | force: yes |
| 10 | tags: [installer] |
| 11 | - name: Installer files and directories are copied |
| 12 | copy: |
| 13 | src: "{{ cord_home }}/incubator/voltha/{{ item }}" |
| 14 | dest: /home/vinstall |
| 15 | owner: vinstall |
| 16 | group: vinstall |
| 17 | with_items: |
| 18 | - install/installer.sh |
| 19 | - install/install.cfg |
| 20 | - install/ansible |
| 21 | - compose |
| 22 | - nginx_config |
| 23 | tags: [installer] |
| 24 | - name: Determine if test mode is active |
| 25 | become: false |
| 26 | local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test" |
| 27 | register: file |
| 28 | ignore_errors: true |
| 29 | - name: Test mode file is copied |
| 30 | copy: |
| 31 | src: "{{ cord_home }}/incubator/voltha/install/.test" |
| 32 | dest: /home/vinstall |
| 33 | when: file.stat.exists |
| 34 | - name: The installer is made executable |
| 35 | file: |
| 36 | path: /home/vinstall/installer.sh |
| 37 | mode: 0744 |
| 38 | tags: [installer] |
| 39 | - name: Python docker-py {{ docker_py_version }} package source is available |
| 40 | command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}" |
| 41 | tags: [installer] |
| 42 | - name: Python netifaces {{ netifaces_version }} package source is available |
| 43 | command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}" |
| 44 | tags: [installer] |
| 45 | - name: Deb file directory doesn't exist |
| 46 | file: |
| 47 | path: /home/vinstall/deb_files |
| 48 | state: absent |
| 49 | tags: [installer] |
| 50 | - name: Deb files are saved. |
| 51 | command: cp -r /var/cache/apt/archives /home/vinstall |
| 52 | tags: [installer] |
| 53 | - name: Deb file directory is renamed |
| 54 | command: mv /home/vinstall/archives /home/vinstall/deb_files |
| 55 | tags: [installer] |