blob: 098d17deaaa185f657816938e738fbeb0c7c853a [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
Sergio Slobodriand49da362017-08-24 16:54:53 -040035 - consul_config/basic.json
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040036 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040037
38- name: Determine if test mode is active
39 become: false
40 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
41 register: file
42 ignore_errors: true
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040043
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040044- name: Test mode file is copied
45 copy:
46 src: "{{ cord_home }}/incubator/voltha/install/.test"
47 dest: /home/vinstall
48 when: file.stat.exists
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040049
Sergio Slobodrian86843702017-09-05 23:22:39 -040050- name: The installer scripts are made executable
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040051 file:
Sergio Slobodrian86843702017-09-05 23:22:39 -040052 path: "/home/vinstall/{{ item }}"
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040053 mode: 0744
Sergio Slobodrian86843702017-09-05 23:22:39 -040054 with_items:
55 - installer.sh
56 - sort_packages.sh
57 - sort_packages.py
58 - install_packages.sh
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040059 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040060
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040061- name: Python docker-py {{ docker_py_version }} package source is available
62 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
63 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040064
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040065- name: Python netifaces {{ netifaces_version }} package source is available
66 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
67 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040068
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040069- name: Deb file directory doesn't exist
70 file:
71 path: /home/vinstall/deb_files
72 state: absent
73 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040074
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040075- name: Deb files are saved.
76 command: cp -r /var/cache/apt/archives /home/vinstall
77 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040078
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040079- name: Deb file directory is renamed
80 command: mv /home/vinstall/archives /home/vinstall/deb_files
81 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040082
Sergio Slobodrian5727e982017-06-28 21:02:27 -040083- name: Installer directories are owned by vinstall
84 file:
85 path: /home/vinstall/{{ item }}
86 owner: vinstall
87 group: vinstall
88 recurse: yes
89 follow: no
90 with_items:
91 - ansible
92 - compose
Sergio Slobodrian5727e982017-06-28 21:02:27 -040093 - .ansible
94 - deb_files
95 - docker-py
96 - netifaces
97 tags: [installer]
Sergio Slobodrianee417fa2017-08-11 09:34:50 -040098
Sergio Slobodrian5727e982017-06-28 21:02:27 -040099- name: Installer files are owned by vinstall
100 file:
101 path: /home/vinstall/{{ item }}
102 owner: vinstall
103 group: vinstall
104 follow: no
105 with_items:
106 - installer.sh
107 - install.cfg
Sergio Slobodriancab0a392017-07-13 08:42:10 -0400108 - voltha-swarm-start.sh
109 - voltha-swarm-stop.sh
Sergio Slobodrianee417fa2017-08-11 09:34:50 -0400110 - get-logs.sh
Sergio Slobodrianbcd30b12017-08-22 22:32:00 -0400111 - get-host-logs.sh
Sergio Slobodrian5727e982017-06-28 21:02:27 -0400112 - docker-compose-Linux-x86_64
113 tags: [installer]