aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_conf/templates/ansible_installer/openstack_juno/inventories/HA-ansible-multinodes.tmpl
blob: 9197f5010e942df41135fa477d59163a8282accf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#set controllers = $getVar('controller', [])
#set computes = $getVar('compute', [])
#set has = $getVar('ha', [])
#set odls = $getVar('odl', [])
#set onoss = $getVar('onos', [])
#set ceph_adm_list = $getVar('ceph_adm',[])
#set ceph_mon_list = $getVar('ceph_mon',[])
#set ceph_osd_list = $getVar('ceph_osd',[])
#set sec_patch_list = $getVar('sec_patch',[])
#set ceph_osd_node_list = $getVar('ceph_osd_node',[])

#if not $isinstance($controllers, list)
    #set controllers = [$controllers]
#end if
#if not $isinstance($computes, list)
    #set computes = [$computes]
#end if
#if not $isinstance(has, list)
    #set has = [has]
#end if
#if not $isinstance(odls, list)
    #set odls = [odls]
#end if
#if not $isinstance(onoss, list)
    #set onoss = [onoss]
#end if
#if not $isinstance(ceph_adm_list, list)
    #set ceph_adm_list = [ceph_adm_list]
#end if
#if not $isinstance(ceph_mon_list, list)
    #set ceph_mon_list = [ceph_mon_list]
#end if
#if not $isinstance(ceph_osd_list, list)
    #set ceph_osd_list = [ceph_osd_list]
#end if
#if not $isinstance(sec_patch_list, list)
    #set sec_patch_list = [sec_patch_list]
#end if
#if not $isinstance(ceph_osd_node_list, list)
    #set ceph_osd_node_list = [ceph_osd_node_list]
#end if

#set credentials = $getVar('server_credentials', {})
#set username = $credentials.get('username', 'root')
#set password = $credentials.get('password', 'root')
[controller]
#for controller in $controllers
    #set controller_ip = $controller.install.ip
    #set controller_hostname = $controller.hostname
$controller_hostname ansible_ssh_host=$controller_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[compute]
#for compute in $computes
    #set compute_ip = $compute.install.ip
    #set compute_hostname = $compute.hostname
$compute_hostname ansible_ssh_host=$compute_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[ha]
#for ha in $has
    #set ha_ip = $ha.install.ip
    #set ha_hostname = $ha.hostname
$ha_hostname ansible_ssh_host=$ha_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[odl]
#for odl in $odls
    #set odl_ip = $odl.install.ip
    #set odl_hostname = $odl.hostname
$odl_hostname ansible_ssh_host=$odl_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[onos]
#for onos in $onoss
    #set onos_ip = $onos.install.ip
    #set onos_hostname = $onos.hostname
$onos_hostname ansible_ssh_host=$onos_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[ceph_adm]
#for ceph_adm in $ceph_adm_list
    #set ceph_adm_ip = $ceph_adm.install.ip
    #set ceph_adm_hostname = $ceph_adm.hostname
$ceph_adm_hostname ansible_ssh_host=$ceph_adm_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[ceph_mon]
#for ceph_mon in $ceph_mon_list
    #set ceph_mon_ip = $ceph_mon.install.ip
    #set ceph_mon_hostname = $ceph_mon.hostname
$ceph_mon_hostname ansible_ssh_host=$ceph_mon_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[ceph_osd]
#for ceph_osd in $ceph_osd_list
    #set ceph_osd_ip = $ceph_osd.install.ip
    #set ceph_osd_hostname = $ceph_osd.hostname
$ceph_osd_hostname ansible_ssh_host=$ceph_osd_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[sec_patch]
#for sec_patch in $sec_patch_list
    #set sec_patch_ip = $sec_patch.install.ip
    #set sec_patch_hostname = $sec_patch.hostname
$sec_patch_hostname ansible_ssh_host=$sec_patch_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for
[ceph_osd_node]
#for ceph_osd_node in $ceph_osd_node_list
    #set ceph_osd_node_ip = $ceph_osd_node.install.ip
    #set ceph_osd_node_hostname = $ceph_osd_node.hostname
$ceph_osd_node_hostname ansible_ssh_host=$ceph_osd_node_ip ansible_ssh_user=$username ansible_ssh_password=$password
#end for

[ceph:children]
ceph_adm
ceph_mon
ceph_osd