diff options
author | James Cammarata <jimi@sngx.net> | 2014-06-04 23:31:59 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2014-06-09 14:14:02 -0500 |
commit | 58a0bcbe514736d116f65c915b4cce6b7706b54f (patch) | |
tree | 0e40d0ff251a835bd6bce09afe392ea83929b110 /library | |
parent | 10074d3622fdba9caaf83ab6fe02f60db9b3a88b (diff) | |
download | ansible-58a0bcbe514736d116f65c915b4cce6b7706b54f.tar.gz |
Fix issue with symlink path detection
Fixes #7627
Fixes #7664
Diffstat (limited to 'library')
-rw-r--r-- | library/files/file | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/files/file b/library/files/file index 29c491b766..c719c82770 100644 --- a/library/files/file +++ b/library/files/file @@ -186,8 +186,9 @@ def main(): relpath = path else: relpath = os.path.dirname(path) + absrc = os.path.normpath('%s/%s' % (relpath, os.path.basename(src))) - if not os.path.exists(absrc) and not force: + if not os.path.exists(src) and not os.path.exists(absrc) and not force: module.fail_json(path=path, src=src, msg='src file does not exist, use "force=yes" if you really want to create the link: %s' % absrc) if state == 'hard': |