blob: cbf220657a9cf2ec76eba1b3b2afeec200e785ac [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 Slobodrianba9cbd82017-06-22 11:45:49 -04006- name: Debian ansible is present
7 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 Slobodrianba9cbd82017-06-22 11:45:49 -040028 - install/ansible
29 - compose
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040030 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040031
32- name: Determine if test mode is active
33 become: false
34 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
35 register: file
36 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040037
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040038- name: Test mode file is copied
39 copy:
40 src: "{{ cord_home }}/incubator/voltha/install/.test"
41 dest: /home/vinstall
42 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040043
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040044- name: The installer is made executable
45 file:
46 path: /home/vinstall/installer.sh
47 mode: 0744
48 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040049
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040050- name: Python docker-py {{ docker_py_version }} package source is available
51 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
52 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040053
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040054- name: Python netifaces {{ netifaces_version }} package source is available
55 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
56 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040057
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040058- name: Deb file directory doesn't exist
59 file:
60 path: /home/vinstall/deb_files
61 state: absent
62 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040063
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040064- name: Deb files are saved.
65 command: cp -r /var/cache/apt/archives /home/vinstall
66 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040067
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040068- name: Deb file directory is renamed
69 command: mv /home/vinstall/archives /home/vinstall/deb_files
70 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040071
Sergio Slobodrian5727e982017-06-28 21:02:27 -040072- name: Installer directories are owned by vinstall
73 file:
74 path: /home/vinstall/{{ item }}
75 owner: vinstall
76 group: vinstall
77 recurse: yes
78 follow: no
79 with_items:
80 - ansible
81 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040082 - .ansible
83 - deb_files
84 - docker-py
85 - netifaces
86 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040087
Sergio Slobodrian5727e982017-06-28 21:02:27 -040088- name: Installer files are owned by vinstall
89 file:
90 path: /home/vinstall/{{ item }}
91 owner: vinstall
92 group: vinstall
93 follow: no
94 with_items:
95 - installer.sh
96 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -040097 - voltha-swarm-start.sh
98 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040099 - get-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400100 - docker-compose-Linux-x86_64
101 tags: [installer]