Merge pull request #505 from sysadmin75/9518
Fixes #9518 - "file state=directory" silently skips if it's currently a ...
This commit is contained in:
commit
b1605ae6b5
1 changed files with 4 additions and 0 deletions
|
@ -240,6 +240,10 @@ def main():
|
||||||
tmp_file_args['path']=curpath
|
tmp_file_args['path']=curpath
|
||||||
changed = module.set_fs_attributes_if_different(tmp_file_args, changed)
|
changed = module.set_fs_attributes_if_different(tmp_file_args, changed)
|
||||||
|
|
||||||
|
# We already know prev_state is not 'absent', therefore it exists in some form.
|
||||||
|
elif prev_state != 'directory':
|
||||||
|
module.fail_json(path=path, msg='%s already exists as a %s' % (path, prev_state))
|
||||||
|
|
||||||
changed = module.set_fs_attributes_if_different(file_args, changed)
|
changed = module.set_fs_attributes_if_different(file_args, changed)
|
||||||
|
|
||||||
if recurse:
|
if recurse:
|
||||||
|
|
Loading…
Reference in a new issue