blob: 5f39f162c9944e6008d2f2a490b3290f99a8440d [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 Slobodrianba9cbd82017-06-22 11:45:49 -040031 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040032
33- name: Determine if test mode is active
34 become: false
35 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
36 register: file
37 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040038
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040039- name: Test mode file is copied
40 copy:
41 src: "{{ cord_home }}/incubator/voltha/install/.test"
42 dest: /home/vinstall
43 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040044
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040045- name: The installer is made executable
46 file:
47 path: /home/vinstall/installer.sh
48 mode: 0744
49 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040050
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040051- name: Python docker-py {{ docker_py_version }} package source is available
52 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
53 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040054
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040055- name: Python netifaces {{ netifaces_version }} package source is available
56 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
57 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040058
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040059- name: Deb file directory doesn't exist
60 file:
61 path: /home/vinstall/deb_files
62 state: absent
63 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040064
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040065- name: Deb files are saved.
66 command: cp -r /var/cache/apt/archives /home/vinstall
67 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040068
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040069- name: Deb file directory is renamed
70 command: mv /home/vinstall/archives /home/vinstall/deb_files
71 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040072
Sergio Slobodrian5727e982017-06-28 21:02:27 -040073- name: Installer directories are owned by vinstall
74 file:
75 path: /home/vinstall/{{ item }}
76 owner: vinstall
77 group: vinstall
78 recurse: yes
79 follow: no
80 with_items:
81 - ansible
82 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040083 - .ansible
84 - deb_files
85 - docker-py
86 - netifaces
87 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040088
Sergio Slobodrian5727e982017-06-28 21:02:27 -040089- name: Installer files are owned by vinstall
90 file:
91 path: /home/vinstall/{{ item }}
92 owner: vinstall
93 group: vinstall
94 follow: no
95 with_items:
96 - installer.sh
97 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -040098 - voltha-swarm-start.sh
99 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400100 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400101 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400102 - docker-compose-Linux-x86_64
103 tags: [installer]