Skip to content

Instantly share code, notes, and snippets.

@johndstein
Created April 6, 2015 13:41
Show Gist options
  • Save johndstein/04f0a8248dda6d4680e3 to your computer and use it in GitHub Desktop.
Save johndstein/04f0a8248dda6d4680e3 to your computer and use it in GitHub Desktop.
Ansible HTTP POST templated file
---
- template:
src: cust_info.json.j2
dest: /var/tmp/cust_info.json
mode: 0777
- command: cat /var/tmp/cust_info.json
register: cust_info
- uri:
url: "{{ hip_apps.lens.register_customer_url }}"
method: POST
body: "{{ cust_info.stdout }}"
HEADER_Content-Type: "application/json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment