summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorMichael Scherer <mscherer@users.noreply.github.com>2016-05-10 12:23:08 +0200
committerRené Moser <mail@renemoser.net>2016-05-10 12:23:08 +0200
commit816673dd6f5df0f9f27753c1c2cadf22ea70befb (patch)
tree67901df5ef67f94068efe40fe0b16a6909333268 /files
parentba4a7a7aa9923cfec20ae67c22bc7329e357da0b (diff)
downloadansible-modules-extras-816673dd6f5df0f9f27753c1c2cadf22ea70befb.tar.gz
Use path type for blockinfile 'dest' argument (#2192)
Diffstat (limited to 'files')
-rw-r--r--files/blockinfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/blockinfile.py b/files/blockinfile.py
index eadf3a62..0fc0fc73 100644
--- a/files/blockinfile.py
+++ b/files/blockinfile.py
@@ -188,7 +188,7 @@ def check_file_attrs(module, changed, message):
def main():
module = AnsibleModule(
argument_spec=dict(
- dest=dict(required=True, aliases=['name', 'destfile']),
+ dest=dict(required=True, aliases=['name', 'destfile'], type='path'),
state=dict(default='present', choices=['absent', 'present']),
marker=dict(default='# {mark} ANSIBLE MANAGED BLOCK', type='str'),
block=dict(default='', type='str', aliases=['content']),
@@ -204,7 +204,7 @@ def main():
)
params = module.params
- dest = os.path.expanduser(params['dest'])
+ dest = params['dest']
if module.boolean(params.get('follow', None)):
dest = os.path.realpath(dest)