Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion library/ssh_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
description:
- Sets the ProxyCommand option.
required: false
identity_file_existence_checking:
description:
- Whether to verify existence of defined identity file. Useful for preparing images with configuration provided at runtime.
default: true
required: false
'''

EXAMPLES = '''
Expand Down Expand Up @@ -709,6 +714,7 @@ def main():
default=None,
choices=['yes', 'no', 'ask']
),
identity_file_existence_checking=dict(default=True, type='bool'),
),
supports_check_mode=True
)
Expand All @@ -723,6 +729,7 @@ def main():
strict_host_key_checking=module.params.get('strict_host_key_checking'),
user_known_hosts_file=module.params.get('user_known_hosts_file'),
proxycommand=module.params.get('proxycommand'),
identity_file_existence_checking=module.params.get('identity_file_existence_checking')
)
state = module.params.get('state')
config_changed = False
Expand All @@ -739,7 +746,7 @@ def main():
)

# See if the identity file exists or not, relative to the config file
if os.path.exists(config_file) and args['identity_file']:
if os.path.exists(config_file) and args['identity_file'] and args['identity_file_existence_checking']:
dirname = os.path.dirname(config_file)
identity_file = args['identity_file']
if(not identity_file.startswith('/') and
Expand Down