mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
In check mode if a symlink does not exist there is no need to check the ownership properties (which causes an exception)
This commit is contained in:
parent
d0dd4ac10c
commit
d5fa690aaf
1 changed files with 3 additions and 0 deletions
|
@ -251,6 +251,9 @@ def main():
|
|||
except OSError, e:
|
||||
module.fail_json(path=path, msg='Error while linking: %s' % str(e))
|
||||
|
||||
if module.check_mode and not os.path.exists(path):
|
||||
module.exit_json(dest=path, src=src, changed=changed)
|
||||
|
||||
changed = module.set_fs_attributes_if_different(file_args, changed)
|
||||
module.exit_json(dest=path, src=src, changed=changed)
|
||||
|
||||
|
|
Loading…
Reference in a new issue