9197f5010e942df41135fa477d59163a8282accf
[compass4nfv.git] /
1 #set controllers = $getVar('controller', [])
2 #set computes = $getVar('compute', [])
3 #set has = $getVar('ha', [])
4 #set odls = $getVar('odl', [])
5 #set onoss = $getVar('onos', [])
6 #set ceph_adm_list = $getVar('ceph_adm',[])
7 #set ceph_mon_list = $getVar('ceph_mon',[])
8 #set ceph_osd_list = $getVar('ceph_osd',[])
9 #set sec_patch_list = $getVar('sec_patch',[])
10 #set ceph_osd_node_list = $getVar('ceph_osd_node',[])
11
12 #if not $isinstance($controllers, list)
13     #set controllers = [$controllers]
14 #end if
15 #if not $isinstance($computes, list)
16     #set computes = [$computes]
17 #end if
18 #if not $isinstance(has, list)
19     #set has = [has]
20 #end if
21 #if not $isinstance(odls, list)
22     #set odls = [odls]
23 #end if
24 #if not $isinstance(onoss, list)
25     #set onoss = [onoss]
26 #end if
27 #if not $isinstance(ceph_adm_list, list)
28     #set ceph_adm_list = [ceph_adm_list]
29 #end if
30 #if not $isinstance(ceph_mon_list, list)
31     #set ceph_mon_list = [ceph_mon_list]
32 #end if
33 #if not $isinstance(ceph_osd_list, list)
34     #set ceph_osd_list = [ceph_osd_list]
35 #end if
36 #if not $isinstance(sec_patch_list, list)
37     #set sec_patch_list = [sec_patch_list]
38 #end if
39 #if not $isinstance(ceph_osd_node_list, list)
40     #set ceph_osd_node_list = [ceph_osd_node_list]
41 #end if
42
43 #set credentials = $getVar('server_credentials', {})
44 #set username = $credentials.get('username', 'root')
45 #set password = $credentials.get('password', 'root')
46 [controller]
47 #for controller in $controllers
48     #set controller_ip = $controller.install.ip
49     #set controller_hostname = $controller.hostname
50 $controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_password=$password
51 #end for
52 [compute]
53 #for compute in $computes
54     #set compute_ip = $compute.install.ip
55     #set compute_hostname = $compute.hostname
56 $compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_password=$password
57 #end for
58 [ha]
59 #for ha in $has
60     #set ha_ip = $ha.install.ip
61     #set ha_hostname = $ha.hostname
62 $ha_hostname ansible_ssh_host=$ha_ip ansible_ssh_user=$username ansible_ssh_password=$password
63 #end for
64 [odl]
65 #for odl in $odls
66     #set odl_ip = $odl.install.ip
67     #set odl_hostname = $odl.hostname
68 $odl_hostname ansible_ssh_host=$odl_ip ansible_ssh_user=$username ansible_ssh_password=$password
69 #end for
70 [onos]
71 #for onos in $onoss
72     #set onos_ip = $onos.install.ip
73     #set onos_hostname = $onos.hostname
74 $onos_hostname ansible_ssh_host=$onos_ip ansible_ssh_user=$username ansible_ssh_password=$password
75 #end for
76 [ceph_adm]
77 #for ceph_adm in $ceph_adm_list
78     #set ceph_adm_ip = $ceph_adm.install.ip
79     #set ceph_adm_hostname = $ceph_adm.hostname
80 $ceph_adm_hostname ansible_ssh_host=$ceph_adm_ip ansible_ssh_user=$username ansible_ssh_password=$password
81 #end for
82 [ceph_mon]
83 #for ceph_mon in $ceph_mon_list
84     #set ceph_mon_ip = $ceph_mon.install.ip
85     #set ceph_mon_hostname = $ceph_mon.hostname
86 $ceph_mon_hostname ansible_ssh_host=$ceph_mon_ip ansible_ssh_user=$username ansible_ssh_password=$password
87 #end for
88 [ceph_osd]
89 #for ceph_osd in $ceph_osd_list
90     #set ceph_osd_ip = $ceph_osd.install.ip
91     #set ceph_osd_hostname = $ceph_osd.hostname
92 $ceph_osd_hostname ansible_ssh_host=$ceph_osd_ip ansible_ssh_user=$username ansible_ssh_password=$password
93 #end for
94 [sec_patch]
95 #for sec_patch in $sec_patch_list
96     #set sec_patch_ip = $sec_patch.install.ip
97     #set sec_patch_hostname = $sec_patch.hostname
98 $sec_patch_hostname ansible_ssh_host=$sec_patch_ip ansible_ssh_user=$username ansible_ssh_password=$password
99 #end for
100 [ceph_osd_node]
101 #for ceph_osd_node in $ceph_osd_node_list
102     #set ceph_osd_node_ip = $ceph_osd_node.install.ip
103     #set ceph_osd_node_hostname = $ceph_osd_node.hostname
104 $ceph_osd_node_hostname ansible_ssh_host=$ceph_osd_node_ip ansible_ssh_user=$username ansible_ssh_password=$password
105 #end for
106
107 [ceph:children]
108 ceph_adm
109 ceph_mon
110 ceph_osd