How can I execute a REST call to an API from a role
http://docs.ansible.com/uri_module.html
- name: add ssh key to stash via api
uri:
url: "{{stash_api_url}}"
method: POST
body: '{"text": "value"}'
body_format: json
status_code: 201
HEADER_Content-Type: "application/json"
register: ssh_key_added_to_stash
ERROR: body is not a legal parameter in an Ansible task or handler
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5daa1cb5-446e-4781-bf32-02776375e300%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.