Skip to content

Commit

Permalink
Prevent error if module.params['path'] has no path included. (ansible…
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored and kbreit committed Jan 11, 2019
1 parent c3c09ec commit 475d529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/modules/crypto/openssh_keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def main():
)

# Check if Path exists
base_dir = os.path.dirname(module.params['path'])
base_dir = os.path.dirname(module.params['path']) or '.'
if not os.path.isdir(base_dir):
module.fail_json(
name=base_dir,
Expand Down

0 comments on commit 475d529

Please sign in to comment.