Hi All,
I defined a json variable in vars section and want to pass it as body in
curl command as below:
vars:
- paydata: {"status":"complete","message":"successfully
completed","actions":["close ticket"]}
- local_action: command curl -X PUT -i -H "Content-Type:application/json"
https://ansibledev.corp.xxxx.com:8443/api/job/{{ ticket }} -k --data "{{
paydata }}" completed","actions":["close ticket"]}' --header
But here is the error I am getting. Seems "paydata" is not passed as
expected.
fatal: [10.225.240.39 -> localhost]: FAILED! => {"changed": true, "cmd":
["curl", "-X", "PUT", "-i", "-H", "Content-Type:application/json", "
https://gns-ansible-dev.corp.xxx.com:8443/api/job/CRQmattcheng22", "-k",
"-d", "{ustatus:", "ucomplete,", "umessage:", "usuccessfully completed,",
"uactions:", "[uclose ticket]}",
Any resolution?
Thank you in advance.
Bikram
--
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/CAEFfMJQTatczPeCz2vcUdcyn9gKiuO6Q8-zdRiJAuQHzACVtLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.