blob: 5db778b04d5efbe9e61d8ea017bd5dd5cb751295 [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
Sergio Slobodrian8725ea82017-08-27 23:47:41 -040030 - install/losetup.conf
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040031 - compose
Sergio Slobodriand49da362017-08-24 16:54:53 -040032 - consul_config/basic.json
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040033 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040034
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 Slobodrianee417fa2017-08-11 09:34:50 -040040
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040041- 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 Slobodrianee417fa2017-08-11 09:34:50 -040046
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040047- name: The installer is made executable
48 file:
49 path: /home/vinstall/installer.sh
50 mode: 0744
51 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040052
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040053- 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 Slobodrianee417fa2017-08-11 09:34:50 -040056
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040057- name: Python netifaces {{ netifaces_version }} package source is available
58 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
59 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040060
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040061- name: Deb file directory doesn't exist
62 file:
63 path: /home/vinstall/deb_files
64 state: absent
65 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040066
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040067- name: Deb files are saved.
68 command: cp -r /var/cache/apt/archives /home/vinstall
69 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040070
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040071- name: Deb file directory is renamed
72 command: mv /home/vinstall/archives /home/vinstall/deb_files
73 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040074
Sergio Slobodrian5727e982017-06-28 21:02:27 -040075- 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 Slobodrian5727e982017-06-28 21:02:27 -040085 - .ansible
86 - deb_files
87 - docker-py
88 - netifaces
89 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040090
Sergio Slobodrian5727e982017-06-28 21:02:27 -040091- 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 Slobodriancab0a392017-07-13 08:42:10 -0400100 - voltha-swarm-start.sh
101 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400102 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400103 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400104 - docker-compose-Linux-x86_64
105 tags: [installer]