blob: 52ccaf496f13eb84c0ad0467b095a5568ffb2d99 [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 Slobodrian86843702017-09-05 23:22:39 -040029 - install/sort_packages.sh
30 - install/sort_packages.py
31 - install/install_packages.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040032 - install/ansible
33 - compose
Sergio Slobodriand49da362017-08-24 16:54:53 -040034 - consul_config/basic.json
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040035 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040036
37- name: Determine if test mode is active
38 become: false
39 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
40 register: file
41 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040042
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040043- name: Test mode file is copied
44 copy:
45 src: "{{ cord_home }}/incubator/voltha/install/.test"
46 dest: /home/vinstall
47 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040048
Sergio Slobodrian86843702017-09-05 23:22:39 -040049- name: The installer scripts are made executable
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040050 file:
Sergio Slobodrian86843702017-09-05 23:22:39 -040051 path: "/home/vinstall/{{ item }}"
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040052 mode: 0744
Sergio Slobodrian86843702017-09-05 23:22:39 -040053 with_items:
54 - installer.sh
55 - sort_packages.sh
56 - sort_packages.py
57 - install_packages.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040058 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040059
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040060- name: Python docker-py {{ docker_py_version }} package source is available
61 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
62 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040063
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040064- name: Python netifaces {{ netifaces_version }} package source is available
65 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
66 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040067
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040068- name: Deb file directory doesn't exist
69 file:
70 path: /home/vinstall/deb_files
71 state: absent
72 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040073
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040074- name: Deb files are saved.
75 command: cp -r /var/cache/apt/archives /home/vinstall
76 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040077
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040078- name: Deb file directory is renamed
79 command: mv /home/vinstall/archives /home/vinstall/deb_files
80 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040081
Sergio Slobodrian5727e982017-06-28 21:02:27 -040082- name: Installer directories are owned by vinstall
83 file:
84 path: /home/vinstall/{{ item }}
85 owner: vinstall
86 group: vinstall
87 recurse: yes
88 follow: no
89 with_items:
90 - ansible
91 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040092 - .ansible
93 - deb_files
94 - docker-py
95 - netifaces
96 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040097
Sergio Slobodrian5727e982017-06-28 21:02:27 -040098- name: Installer files are owned by vinstall
99 file:
100 path: /home/vinstall/{{ item }}
101 owner: vinstall
102 group: vinstall
103 follow: no
104 with_items:
105 - installer.sh
106 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -0400107 - voltha-swarm-start.sh
108 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400109 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400110 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400111 - docker-compose-Linux-x86_64
112 tags: [installer]