e1bf72c426a24025718447468eac1c5464cc6af6
[compass4nfv.git] /
1 #set controllers = $getVar('controller', [])
2 #set computes = $getVar('compute', [])
3 #set storages = $getVar('storage', [])
4 #set networks = $getVar('network', [])
5 #set odls = $getVar('odl', [])
6 #set onoss = $getVar('onos', [])
7 #if not $isinstance($controllers, list)
8     #set controllers = [$controllers]
9 #end if
10 #if not $isinstance($computes, list)
11     #set computes = [$computes]
12 #end if
13 #if not $isinstance($storages, list)
14     #set storages = [$storages]
15 #end if
16 #if not $isinstance($networks, list)
17     #set networks = [$networks]
18 #end if
19 #if not $isinstance($odls, list)
20     #set odls = [$odls]
21 #end if
22 #if not $isinstance($onoss, list)
23     #set onoss = [$onoss]
24 #end if
25
26 #set credentials = $getVar('server_credentials', {})
27 #set username = $credentials.get('username', 'root')
28 #set password = $credentials.get('password', 'root')
29 [controller]
30 #for controller in $controllers
31     #set controller_ip = $controller.management.ip
32     #set controller_hostname = $controller.hostname
33 $controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_password=$password
34 #end for
35
36 [compute]
37 #for compute in $computes
38     #set compute_ip = $compute.management.ip
39     #set compute_hostname = $compute.hostname
40 $compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_password=$password
41 #end for
42
43 [network]
44 #for network in $networks
45     #set network_ip = $network.management.ip
46     #set network_hostname = $network.hostname
47 $network_hostname ansible_ssh_host=$network_ip ansible_ssh_user=$username ansible_ssh_password=$password
48 #end for
49
50 [storage]
51 #for storage in storages
52     #set storage_ip = $storage.management.ip
53     #set storage_hostname = $storage.hostname
54 $storage_hostname ansible_ssh_host=$storage_ip ansible_ssh_user=$username ansible_ssh_password=$password
55 #end for
56 [odl]
57 #for odl in odls
58     #set odl_ip = $odl.management.ip
59     #set odl_hostname = $odl.hostname
60 $odl_hostname ansible_ssh_host=$odl_ip ansible_ssh_user=$username ansible_ssh_password=$password
61 #end for
62 [storage]
63 #for storage in storages
64     #set storage_ip = $storage.management.ip
65     #set storage_hostname = $storage.hostname
66 $storage_hostname ansible_ssh_host=$storage_ip ansible_ssh_user=$username ansible_ssh_password=$password
67 #end for