blob: a958cb0cfb5865318300e50f1e9e0503e5a8a425 [file] [log] [blame]
Sergio Slobodriand24189e2017-06-10 23:27:15 -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]
Sergio Slobodrian36e16552017-06-19 11:00:45 -040011#- 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
Sergio Slobodriand24189e2017-06-10 23:27:15 -040024- name: Installer files and directories are copied
Sergio Slobodrian36e16552017-06-19 11:00:45 -040025 synchronize:
Sergio Slobodriand24189e2017-06-10 23:27:15 -040026 src: "{{ cord_home }}/incubator/voltha/{{ item }}"
27 dest: /home/vinstall
Sergio Slobodrian36e16552017-06-19 11:00:45 -040028 archive: no
29 owner: no
30 perms: no
31 recursive: yes
32 links: yes
Sergio Slobodriand24189e2017-06-10 23:27:15 -040033 with_items:
34 - install/installer.sh
35 - install/install.cfg
36 - install/ansible
37 - compose
38 - nginx_config
39 tags: [installer]
Sergio Slobodrian36e16552017-06-19 11:00:45 -040040- name: Installer directories are owned by vinstall
41 file:
42 path: /home/vinstall/{{ item }}
43 owner: vinstall
44 group: vinstall
45 recurse: yes
46 follow: no
47 with_items:
48 - ansible
49 - compose
50 - nginx_config
51 tags: [installer]
52- name: Installer files are owned by vinstall
53 file:
54 path: /home/vinstall/{{ item }}
55 owner: vinstall
56 group: vinstall
57 follow: no
58 with_items:
59 - installer.sh
60 - install.cfg
61 tags: [installer]
62
Sergio Slobodriand24189e2017-06-10 23:27:15 -040063- name: Determine if test mode is active
64 become: false
65 local_action: stat path="{{ cord_home }}/incubator/voltha/install/.test"
66 register: file
67 ignore_errors: true
68- name: Test mode file is copied
69 copy:
70 src: "{{ cord_home }}/incubator/voltha/install/.test"
71 dest: /home/vinstall
72 when: file.stat.exists
73- name: The installer is made executable
74 file:
75 path: /home/vinstall/installer.sh
76 mode: 0744
77 tags: [installer]
78- name: Python docker-py {{ docker_py_version }} package source is available
79 command: pip download -d /home/vinstall/docker-py "docker-py=={{ docker_py_version }}"
80 tags: [installer]
81- name: Python netifaces {{ netifaces_version }} package source is available
82 command: pip download -d /home/vinstall/netifaces "netifaces=={{ netifaces_version }}"
83 tags: [installer]
84- name: Deb file directory doesn't exist
85 file:
86 path: /home/vinstall/deb_files
87 state: absent
88 tags: [installer]
89- name: Deb files are saved.
90 command: cp -r /var/cache/apt/archives /home/vinstall
91 tags: [installer]
92- name: Deb file directory is renamed
93 command: mv /home/vinstall/archives /home/vinstall/deb_files
94 tags: [installer]