Skip to content

Commit

Permalink
Fix ansible_ssh_common_args in molecule.yml (#3121)
Browse files Browse the repository at this point in the history
* Fix ansible_ssh_common_args in molecule.yml

Makes the option `ansible_ssh_common_args` in molecule.yml work as documented.

* Fixed formatting (black)

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
  • Loading branch information
gardar and ssbarnea authored May 19, 2021
1 parent ce9f9df commit 6f52203
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/molecule/driver/delegated.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,16 @@ def default_safe_files(self):
@property
def default_ssh_connection_options(self):
if self.managed:
return self._get_ssh_connection_options()
ssh_connopts = self._get_ssh_connection_options()
if self.options.get("ansible_connection_options", {}).get(
"ansible_ssh_common_args", None
):
ssh_connopts.append(
self.options.get("ansible_connection_options").get(
"ansible_ssh_common_args"
)
)
return ssh_connopts
return []

def login_options(self, instance_name):
Expand Down

0 comments on commit 6f52203

Please sign in to comment.