thanks it works. but what I was expecting the curl command response to be 
something like that: 

*{    "clusterIds": [],    "href": 
"http://52.73.56.141:8080/mmc-console-3.6.2/api/deployments/local$41d39485-d193-4d4b-ae59-1440d2b5c858";,
 
   "reconciled": false,    "clusterNames": [],    "applications": 
["local$43d12cfd-f64a-4fa9-9367-3a0109c1721d"],    "servers": 
["local$d50bdc24-ff04-4327-9284-7bb708e21c25"],    "lastModified": "Fri, 29 
Jul 2016 15:22:41.680 UTC",    "status": "UNDEPLOYED",    "name": 
"ms3-simple-hello-world-app",    "id": 
"local$41d39485-d193-4d4b-ae59-1440d2b5c858"}*but the response that I am 
having is this one :
ok: [ip-172-31-61-191.ec2.internal] => {
    "deployment": {
        "changed": true,
        "cmd": [
            "curl",
            "--basic",
            "-u",
            "admin:admin",
            "-d",
            "{\"name:ms3-test-app\" 
\"servers:[local$d50bdc24-ff04-4327-9284-7bb708e21c25\"] 
\"applications:[local$88853b6a-0894-4afc-be83-6f76d2e9d9bb\"]}",
            "--header",
            "Content-Type:application/json",
            "http://52.73.56.141:8080/mmc-console-3.6.2/api/deployments";
        ],
        "delta": "0:00:00.015622",
        "end": "2016-07-31 18:13:11.427146",
        "rc": 0,
        "start": "2016-07-31 18:13:11.411524",
        "stderr": "  % Total    % Received % Xferd  Average Speed   Time    
Time     Time  Current\n                                 Dload  Upload   
Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      
0 --:--:-- --:--:-- --:--:--     0\r100 11731    0 11595  100   136   974k  
11708 --:--:-- --:--:-- --:--:-- 1029k",


That's not what i was expecting I don't why but when I run that curl 
command manually it works fine :
[ec2-user@ip-172-31-21-77 playbooks]$ curl --basic -u admin:admin -d 
'{"name":"ms3-simple-hello-world-app" , "servers": [ 
"local$d50bdc24-ff04-4327-9284-7bb708e21c25" ], "applications": [ 
"local$43d12cfd-f64a-4fa9-9367-3a0109c1721d" ]}' --header 'Content-Type: 
application/json' http://52.73.56.141:8080/mmc-console-3.6.2/api/deployments
A deployment with that name already exists chose another name please or 
remove existing one[ec2-user@ip-172-31-21-77 playbooks]$ 

On Sunday, July 31, 2016 at 12:21:48 PM UTC-4, Kai Stian Olstad wrote:
>
> On 31. juli 2016 17:39, GBANE FETIGUE wrote: 
> > *now here is the error I am getting; anyother ideas The error appears to 
> > have been in '/etc/ansible/playbooks/deployment.yml': line 2, column 3, 
> but 
> > maybe elsewhere in the file depending on the exact syntax problem.* 
> > The offending line appears to be: 
> > 
> > 
> > - local_action: curl --basic -u admin:admin -d '"name:ms3-test-app" , 
> > "servers:local$d50bdc24-ff04-4327-9284-7bb708e21c25" , 
> > "applications:local$6444f208-f78c-4e1b-8b1e-4542f511f503"' --header 
> > 'Content-Type:application/json' 
> > "http://52.73.56.141:8080/mmc-console-3.6.2/api/deployments"; 
> >   ^ here 
>
> It should have worked I guess. 
> But if you replace local_action with command and add delegate_to, it 
> will work 
>
> - command: curl............ 
>    delegate_to: localhost 
>
> -- 
> Kai Stian Olstad 
>

-- 
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/3fd9723e-3c3e-4be9-b374-16f083e6f697%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to