Hi,

I am trying to automate deployment of ambari cluster with Ansible and I do 
not seem to be able to get the POST method working.

The command that I use with curl is:

curl --user admin:admin -H 'X-Requested-By:exapackets' -X POST http://c6501:
8080/api/v1/blueprints/multinode_cluster -d @blueprint.json


This works fine.


I tried:

uri: user=admin password=admin method=POST force_basic_auth=yes 
HEADER_=X-Requested-By:exapackets 
url=http://c6501:8080/api/v1/blueprints/multinode_cluster body="{{ 
lookup('file','blueprint.json') }}"

and

HEADER_X-Requested-By=exapackets

and

HEADER_X-Requested-By:exapackets=''


None of the seem to work. My suspicion is that the problem is that Ansible 
expects key=value and in the case of headers, the equal sign becomes part 
of the header. Any idea?


Of course, for now as a workaround, I am running the curl command as a 
shell.


Behdad


-- 
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/10b49c59-32f9-49a9-bae4-54746ee91456%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to