blob: 492386df47f5691c36e7c2d7232365eeca76403f [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 Slobodrianb09ba702017-11-02 15:43:35 -040032 - install/BashLoginTarget.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040033 - install/ansible
34 - compose
Stephane Barbarie2cbffca2018-03-26 16:20:03 -040035 - k8s
Sergio Slobodriand49da362017-08-24 16:54:53 -040036 - consul_config/basic.json
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040037 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040038
39- name: Determine if test mode is active
40 become: false
41 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
42 register: file
43 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040044
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040045- name: Test mode file is copied
46 copy:
47 src: "{{ cord_home }}/incubator/voltha/install/.test"
48 dest: /home/vinstall
49 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040050
Sergio Slobodrian86843702017-09-05 23:22:39 -040051- name: The installer scripts are made executable
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040052 file:
Sergio Slobodrian86843702017-09-05 23:22:39 -040053 path: "/home/vinstall/{{ item }}"
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040054 mode: 0744
Sergio Slobodrian86843702017-09-05 23:22:39 -040055 with_items:
56 - installer.sh
57 - sort_packages.sh
58 - sort_packages.py
59 - install_packages.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040060 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040061
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040062- name: Python docker-py {{ docker_py_version }} package source is available
63 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
64 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040065
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040066- name: Python netifaces {{ netifaces_version }} package source is available
67 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
68 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040069
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040070- name: Deb file directory doesn't exist
71 file:
72 path: /home/vinstall/deb_files
73 state: absent
74 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040075
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040076- name: Deb files are saved.
77 command: cp -r /var/cache/apt/archives /home/vinstall
78 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040079
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040080- name: Deb file directory is renamed
81 command: mv /home/vinstall/archives /home/vinstall/deb_files
82 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040083
Sergio Slobodrian5727e982017-06-28 21:02:27 -040084- name: Installer directories are owned by vinstall
85 file:
86 path: /home/vinstall/{{ item }}
87 owner: vinstall
88 group: vinstall
89 recurse: yes
90 follow: no
91 with_items:
92 - ansible
93 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040094 - .ansible
95 - deb_files
96 - docker-py
97 - netifaces
98 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040099
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400100- name: Installer files are owned by vinstall
101 file:
102 path: /home/vinstall/{{ item }}
103 owner: vinstall
104 group: vinstall
105 follow: no
106 with_items:
107 - installer.sh
108 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -0400109 - voltha-swarm-start.sh
110 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400111 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400112 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400113 - docker-compose-Linux-x86_64
114 tags: [installer]