feat(contrib/terraform): support custom ssh port (#9836)

pull/9847/head
Maxime Leroy 2023-03-03 03:24:58 +01:00 committed by GitHub
parent 501deecdd0
commit 659fa0eddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -316,7 +316,9 @@ def openstack_host(resource, module_name):
# attrs specific to Ansible
if 'metadata.ssh_user' in raw_attrs:
attrs['ansible_ssh_user'] = raw_attrs['metadata.ssh_user']
attrs['ansible_user'] = raw_attrs['metadata.ssh_user']
if 'metadata.ssh_port' in raw_attrs:
attrs['ansible_port'] = raw_attrs['metadata.ssh_port']
if 'volume.#' in list(raw_attrs.keys()) and int(raw_attrs['volume.#']) > 0:
device_index = 1