--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d2cf9f61-f941-411b-9bd4-db0e269efee7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi! How do you feel about something like this for the uri module?# module.params section# if body is a file URL, e.g. 'file:///bin/false', read it in and replace the text of body with the binary contents of the fileif urlparse.urlparse(body).scheme == 'file':try:body = open(urlparse.urlparse(body).path, 'rb').read()except Exception as e:module.fail_json(msg="failed to open %s for body: %s" % (urlparse.urlparse(body).path, str(e) ) )Should file location be relative to roles dir?Thanks a lot!!!!Guy
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/85069925-7e89-4036-9861-748061c5ad63%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgwd_wT7UES6V2%3D%2B5a2wAOVzaZr-hwGsEuQQ-7RD9nkmLw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABnTgtXYQt15CYv5yV%3DD0ztidmUr4L-ZeN3kgevpYGoWr8f4cA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1b8ce4d7-dc39-460f-bff6-cd51cfd2446a%40googlegroups.com.