Exécuter curl -X avec playbook Ansible

Je veux exécuter la commande suivante à l'aide de ansible playbook:

curl -X POST [email protected] -H "Content-Type: application/json" http://marathon.service.consul:8080/v2/apps

Comment puis-je le faire fonctionner?

Si je lance:

- name: post to consul
  uri:
    url: http://marathon.service.consul:8080/v2/apps/
    method: POST
    body: "{{ lookup('file','mesos-consul.json') }}"
    body_format: json
    HEADER_Content-Type: "application/json"

J'ai de la prochaine échouer:

fatal: [172.16.8.231]: FAILED! => {"failed": true, "msg": "ERROR! the file_name '/home/ikerlan/Ik4-Data-Platform/ansible/playbooks/Z_PONER_EN_MARCHA/dns-consul/mesos-consul.j2' does not exist, or is not readable"}

source d'informationauteur Asier Gomez