blob: 20330c46f4d9792407ad3780756f15400801fe7a [file] [log] [blame]
Sergio Slobodrianc5477712017-06-07 11:56:56 -04001# Note: When the target == "cluster" the installer
2# is running to install voltha in the cluster hosts.
3# Whe the target == "installer" the installer is being
4# created.
Sergio Slobodriand24189e2017-06-10 23:27:15 -04005- name: A .ssh directory for the voltha user exists
6 file:
7 #path: "{{ ansible_env['HOME'] }}/.ssh"
8 path: "/home/voltha/.ssh"
9 state: directory
10 owner: voltha
11 group: voltha
12 tags: [cluster_host]
13
14- name: known_hosts file is absent for the voltha user
15 file:
16 path: "/home/voltha/.ssh/known_hosts"
17 state: absent
18 tags: [cluster_host]
19
20- name: Known host checking is disabled
21 copy:
22 src: files/ssh_config
23 dest: "/home/voltha/.ssh/config"
24 owner: voltha
25 group: voltha
26 mode: 0600
27 tags: [cluster_host]
28
29- name: Cluster host keys are propagated to all hosts in the cluster
30 copy:
31 src: files/.keys
32 dest: "/home/voltha"
33 owner: voltha
34 group: voltha
35 mode: 0600
36 tags: [cluster_host]
37
Sergio Slobodrianc5477712017-06-07 11:56:56 -040038- name: Required configuration directories are copied
39 copy:
40 src: "/home/vinstall/{{ item }}"
41 dest: "{{ target_voltha_home }}"
42 owner: voltha
43 group: voltha
44 with_items:
45 - docker-py
46 - netifaces
47 - deb_files
48 when: target == "cluster"
Sergio Slobodriand24189e2017-06-10 23:27:15 -040049 tags: [cluster_host]
Sergio Slobodrianc5477712017-06-07 11:56:56 -040050
51- name: Dependent software is installed
52 command: dpkg -i "{{ target_voltha_home }}/deb_files/{{ item }}"
53 with_items: "{{ deb_files }}"
54 when: target == "cluster"
55 ignore_errors: true
56 when: target == "cluster"
Sergio Slobodriand24189e2017-06-10 23:27:15 -040057 tags: [cluster_host]
Sergio Slobodrianc5477712017-06-07 11:56:56 -040058
59- name: Dependent software is initialized
60 command: apt-get -f install
61 when: target == "cluster"
Sergio Slobodriand24189e2017-06-10 23:27:15 -040062 tags: [cluster_host]
Sergio Slobodrianc5477712017-06-07 11:56:56 -040063
Sergio Slobodriand24189e2017-06-10 23:27:15 -040064- name: Python packages are installed
Sergio Slobodrianc5477712017-06-07 11:56:56 -040065 command: pip install {{ item }} --no-index --find-links "file://{{ target_voltha_home }}/{{ item }}"
66 with_items:
67 - docker-py
68 - netifaces
69 when: target == "cluster"
Sergio Slobodriand24189e2017-06-10 23:27:15 -040070 tags: [cluster_host]
Sergio Slobodrianc5477712017-06-07 11:56:56 -040071
72- name: Configuration directories are deleted
73 file:
74 path: "{{ target_voltha_home }}/{{ item }}"
75 state: absent
76 with_items:
77 - docker-py
78 - netifaces
79 - deb_files
80 when: target == "cluster"
Sergio Slobodriand24189e2017-06-10 23:27:15 -040081 tags: [cluster_host]
Sergio Slobodrianc5477712017-06-07 11:56:56 -040082