GlusterFS with external VMs, terraform/os included

This commit is contained in:
Pablo Moreno
2016-11-11 03:59:46 +00:00
parent 26f93feb2d
commit 27e239c8d6
28 changed files with 595 additions and 1 deletions

View File

@ -347,6 +347,15 @@ def openstack_host(resource, module_name):
if 'metadata.ssh_user' in raw_attrs:
attrs['ansible_ssh_user'] = raw_attrs['metadata.ssh_user']
if 'volume.#' in raw_attrs.keys() and int(raw_attrs['volume.#']) > 0:
device_index = 1
for key, value in raw_attrs.items():
match = re.search("^volume.*.device$", key)
if match:
attrs['disk_volume_device_'+str(device_index)] = value
device_index += 1
# attrs specific to Mantl
attrs.update({
'consul_dc': _clean_dc(attrs['metadata'].get('dc', module_name)),