blob: 0b1666ec767f37a773b64ec2f14b6aac0c3445d9 [file] [log] [blame]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -04001- name: Ansible repository is available
2 apt_repository:
3 repo: 'ppa:ansible/ansible'
4 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -04005
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -04006- name: Ansible is present
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -04007 apt:
8 name: ansible
9 state: latest
10 force: yes
11 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040012
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040013- 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 Slobodrianba9cbd82017-06-22 11:45:49 -040023 - install/installer.sh
24 - install/install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -040025 - install/voltha-swarm-start.sh
26 - install/voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040027 - install/get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -040028 - install/get-host-logs.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040029 - install/ansible
30 - compose
Sergio Slobodriand49da362017-08-24 16:54:53 -040031 - consul_config/basic.json
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040032 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040033
34- name: Determine if test mode is active
35 become: false
36 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
37 register: file
38 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040039
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040040- name: Test mode file is copied
41 copy:
42 src: "{{ cord_home }}/incubator/voltha/install/.test"
43 dest: /home/vinstall
44 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040045
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040046- name: The installer is made executable
47 file:
48 path: /home/vinstall/installer.sh
49 mode: 0744
50 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040051
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040052- name: Python docker-py {{ docker_py_version }} package source is available
53 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
54 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040055
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040056- name: Python netifaces {{ netifaces_version }} package source is available
57 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
58 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040059
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040060- name: Deb file directory doesn't exist
61 file:
62 path: /home/vinstall/deb_files
63 state: absent
64 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040065
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040066- name: Deb files are saved.
67 command: cp -r /var/cache/apt/archives /home/vinstall
68 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040069
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040070- name: Deb file directory is renamed
71 command: mv /home/vinstall/archives /home/vinstall/deb_files
72 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040073
Sergio Slobodrian5727e982017-06-28 21:02:27 -040074- name: Installer directories are owned by vinstall
75 file:
76 path: /home/vinstall/{{ item }}
77 owner: vinstall
78 group: vinstall
79 recurse: yes
80 follow: no
81 with_items:
82 - ansible
83 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040084 - .ansible
85 - deb_files
86 - docker-py
87 - netifaces
88 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040089
Sergio Slobodrian5727e982017-06-28 21:02:27 -040090- name: Installer files are owned by vinstall
91 file:
92 path: /home/vinstall/{{ item }}
93 owner: vinstall
94 group: vinstall
95 follow: no
96 with_items:
97 - installer.sh
98 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -040099 - voltha-swarm-start.sh
100 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400101 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400102 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400103 - docker-compose-Linux-x86_64
104 tags: [installer]