Set a status_code: field to the value marathon returns, it looks like
you are getting a 200 and ansible is expecting a 201.

On 12 October 2016 at 17:00, Yogesh Darji
<optimisticyogeshda...@gmail.com> wrote:
> Hi,
>
> I deployed an app on Marathon with POST using uri module. My inventory file
> has just localhost which I am using to execute my playbooks.
>
> I have written a playbook to delete that app, it will successfully delete
> the app, but the only problem which I am facing is that I am getting below
> error with successful response code.
>
> fatal: [localhost]: FAILED! => {"cache_control": "no-cache, no-store,
> must-revalidate", "changed": false, "connection": "close", "content":
> "{\"version\":\"2016-10-12T15:51:51.738Z\",\"deploymentId\":\"f200ffd5-095f-4dd5-865b-4958f0d0adfc\"}",
> "content_length": "92", "content_type": "application/json; qs=2", "date":
> "Wed, 12 Oct 2016 15:51:06 GMT", "expires": "0", "failed": true, "json":
> {"deploymentId": "f200ffd5-095f-4dd5-865b-4958f0d0adfc", "version":
> "2016-10-12T15:51:51.738Z"}, "msg": "Status code was not [201]: OK (92
> bytes)", "pragma": "no-cache", "redirected": false, "server":
> "openresty/1.7.10.2", "status": 200, "url":
> "http://jmontesvm07.verizon.com:19092/v2/apps/demoansible";,
> "x_marathon_leader": "http://10.200.161.1:31392"}
>
>
> I am concerned about the highlighted error and I want to get rid of it.
>
>
> The json response gives successful response with status 200. Can anyone help
> me with how to solve the highlighted error.
>
>
> Thanks in advance.
>
>
> -Yogesh Darji
>
> --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/b80ef440-2fd5-4f3c-8199-0f8147c5c09e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAK5eLPRXAY9aaaCeoVUDN6jH0oLOg6W_O9xiPoK%3Dh3j7eo6Y%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to