94a6a153b0863ff9b5578f0e343da34b6495a8be
[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 opencontrails = $getVar('opencontrail', [])
7 #set ceph_adm_list = $getVar('ceph_adm',[])
8 #set ceph_mon_list = $getVar('ceph_mon',[])
9 #set ceph_osd_list = $getVar('ceph_osd',[])
10
11 #if not $isinstance($controllers, list)
12     #set controllers = [$controllers]
13 #end if
14 #if not $isinstance($computes, list)
15     #set computes = [$computes]
16 #end if
17 #if not $isinstance(has, list)
18     #set has = [has]
19 #end if
20 #if not $isinstance(odls, list)
21     #set odls = [odls]
22 #end if
23 #if not $isinstance(onoss, list)
24     #set onoss = [onoss]
25 #end if
26 #if not $isinstance(opencontrails, list)
27     #set opencontrails = [opencontrails]
28 #end if
29 #if not $isinstance(ceph_adm_list, list)
30     #set ceph_adm_list = [ceph_adm_list]
31 #end if
32 #if not $isinstance(ceph_mon_list, list)
33     #set ceph_mon_list = [ceph_mon_list]
34 #end if
35 #if not $isinstance(ceph_osd_list, list)
36     #set ceph_osd_list = [ceph_osd_list]
37 #end if
38
39 #set credentials = $getVar('server_credentials', {})
40 #set username = $credentials.get('username', 'root')
41 #set password = $credentials.get('password', 'root')
42 [controller]
43 #for controller in $controllers
44     #set controller_ip = $controller.install.ip
45     #set controller_hostname = $controller.hostname
46 $controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_password=$password
47 #end for
48 [compute]
49 #for compute in $computes
50     #set compute_ip = $compute.install.ip
51     #set compute_hostname = $compute.hostname
52 $compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_password=$password
53 #end for
54 [ha]
55 #for ha in $has
56     #set ha_ip = $ha.install.ip
57     #set ha_hostname = $ha.hostname
58 $ha_hostname ansible_ssh_host=$ha_ip ansible_ssh_user=$username ansible_ssh_password=$password
59 #end for
60 [odl]
61 #for odl in $odls
62     #set odl_ip = $odl.install.ip
63     #set odl_hostname = $odl.hostname
64 $odl_hostname ansible_ssh_host=$odl_ip ansible_ssh_user=$username ansible_ssh_password=$password
65 #end for
66 [onos]
67 #for onos in $onoss
68     #set onos_ip = $onos.install.ip
69     #set onos_hostname = $onos.hostname
70 $onos_hostname ansible_ssh_host=$onos_ip ansible_ssh_user=$username ansible_ssh_password=$password
71 #end for
72 [opencontrail]
73 #for opencontrail in $opencontrails
74     #set opencontrail_ip = $opencontrail.install.ip
75     #set opencontrail_hostname = $opencontrail.hostname
76 $opencontrail_hostname ansible_ssh_host=$opencontrail_ip ansible_ssh_user=$username ansible_ssh_password=$password
77 #end for
78 [ceph_adm]
79 #for ceph_adm in $ceph_adm_list
80     #set ceph_adm_ip = $ceph_adm.install.ip
81     #set ceph_adm_hostname = $ceph_adm.hostname
82 $ceph_adm_hostname ansible_ssh_host=$ceph_adm_ip ansible_ssh_user=$username ansible_ssh_password=$password
83 #end for
84 [ceph_mon]
85 #for ceph_mon in $ceph_mon_list
86     #set ceph_mon_ip = $ceph_mon.install.ip
87     #set ceph_mon_hostname = $ceph_mon.hostname
88 $ceph_mon_hostname ansible_ssh_host=$ceph_mon_ip ansible_ssh_user=$username ansible_ssh_password=$password
89 #end for
90 [ceph_osd]
91 #for ceph_osd in $ceph_osd_list
92     #set ceph_osd_ip = $ceph_osd.install.ip
93     #set ceph_osd_hostname = $ceph_osd.hostname
94 $ceph_osd_hostname ansible_ssh_host=$ceph_osd_ip ansible_ssh_user=$username ansible_ssh_password=$password
95 #end for
96 [ceph:children]
97 ceph_adm
98 ceph_mon
99 ceph_osd
100