blob: dc6bbcf7f649208ad083225475edac9c1b4cffe0 [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]
5- name: Debian ansible is present
6 apt:
7 name: ansible
8 state: latest
9 force: yes
10 tags: [installer]
11#- name: Installer files and directories are copied
12# copy:
13# src: "{{ cord_home }}/incubator/voltha/{{ item }}"
14# dest: /home/vinstall
15# owner: vinstall
16# group: vinstall
17# follow: no
18# with_items:
19# - install/installer.sh
20# - install/install.cfg
21# - install/ansible
22# - compose
23# - nginx_config
24- name: Installer files and directories are copied
25 synchronize:
26 src: "{{ cord_home }}/incubator/voltha/{{ item }}"
27 dest: /home/vinstall
28 archive: no
29 owner: no
30 perms: no
31 recursive: yes
32 links: yes
33 with_items:
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040034 - install/installer.sh
35 - install/install.cfg
36 - install/ansible
37 - compose
38 - nginx_config
39 tags: [installer]
Sergio Slobodrianba9cbd82017-06-22 11:45:49 -040040
41- name: Determine if test mode is active
42 become: false
43 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
44 register: file
45 ignore_errors: true
46- name: Test mode file is copied
47 copy:
48 src: "{{ cord_home }}/incubator/voltha/install/.test"
49 dest: /home/vinstall
50 when: file.stat.exists
51- name: The installer is made executable
52 file:
53 path: /home/vinstall/installer.sh
54 mode: 0744
55 tags: [installer]
56- name: Python docker-py {{ docker_py_version }} package source is available
57 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
58 tags: [installer]
59- name: Python netifaces {{ netifaces_version }} package source is available
60 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
61 tags: [installer]
62- name: Deb file directory doesn't exist
63 file:
64 path: /home/vinstall/deb_files
65 state: absent
66 tags: [installer]
67- name: Deb files are saved.
68 command: cp -r /var/cache/apt/archives /home/vinstall
69 tags: [installer]
70- name: Deb file directory is renamed
71 command: mv /home/vinstall/archives /home/vinstall/deb_files
72 tags: [installer]
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
83 - nginx_config
84 - .ansible
85 - deb_files
86 - docker-py
87 - netifaces
88 tags: [installer]
89- 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
98 - docker-compose-Linux-x86_64
99 tags: [installer]