1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adds path type and remove expanduser

Related to #12263, this patch removes the usage of expanduser
in favor of the path 'type' for the module options of src and
dest
This commit is contained in:
Tim Rupp 2017-02-11 15:15:04 -08:00 committed by Brian Coca
parent 1fb53e6aaf
commit c4d3bf3207

View file

@ -188,9 +188,9 @@ def main():
module = AnsibleModule(
# not checking because of daisy chain to file module
argument_spec = dict(
src = dict(required=True),
src = dict(required=True, type='path'),
delimiter = dict(required=False),
dest = dict(required=True),
dest = dict(required=True, type='path'),
backup=dict(default=False, type='bool'),
remote_src=dict(default=False, type='bool'),
regexp = dict(required=False),
@ -203,8 +203,8 @@ def main():
changed = False
path_hash = None
dest_hash = None
src = os.path.expanduser(module.params['src'])
dest = os.path.expanduser(module.params['dest'])
src = module.params['src']
dest = module.params['dest']
backup = module.params['backup']
delimiter = module.params['delimiter']
regexp = module.params['regexp']