diff options
Diffstat (limited to 'lib/ansible/modules/blockinfile.py')
-rw-r--r-- | lib/ansible/modules/blockinfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/blockinfile.py b/lib/ansible/modules/blockinfile.py index 8c83bf0..3ede6fd 100644 --- a/lib/ansible/modules/blockinfile.py +++ b/lib/ansible/modules/blockinfile.py @@ -269,7 +269,7 @@ def main(): module.fail_json(rc=257, msg='Path %s does not exist !' % path) destpath = os.path.dirname(path) - if not os.path.exists(destpath) and not module.check_mode: + if destpath and not os.path.exists(destpath) and not module.check_mode: try: os.makedirs(destpath) except OSError as e: |