Fix behaviour when file handles a path with tilde
Two problems here * unchecked exception handling and erroneous assumption as to why an exception might fire * although the file module expands the path, when using file_args the unexpanded path is passed. Expected result: ~/path/to/file should work fine Actual result: exception is because it doesn't find file with a message about not being able to get the selinux context
This commit is contained in:
parent
9ea8a679d1
commit
a7a0927298
1 changed files with 1 additions and 1 deletions
2
file
2
file
|
@ -139,7 +139,7 @@ def main():
|
|||
|
||||
params = module.params
|
||||
state = params['state']
|
||||
path = os.path.expanduser(params['path'])
|
||||
params['path'] = path = os.path.expanduser(params['path'])
|
||||
|
||||
# source is both the source of a symlink or an informational passing of the src for a template module
|
||||
# or copy module, even if this module never uses it, it is needed to key off some things
|
||||
|
|
Loading…
Reference in a new issue