Hey all,
Trying to use the URI module instead of a curl command and I can’t seem to get the usage right.
Here’s the shell command:
curl -X POST --data “action=login&username={{api_user}}&password={{api_pass}}” {{api_URL}} -k
Here’s what I have for the module args but I’m not sure how to pass in the --data section
- name: Start new API session
uri:
method=POST
url={{api_URL}}
returncontent=yes
register: session_id_raw
when: session_id is not defined
I’m not sure where to pass in the other flags and arguments. Any help would be much appreciated.
Thanks,
Chip