Couple of things:

1. Ansible has a uri module for API calls, it'll do the same thing but best 
practice is to use a module if there's one available.
2. Where are you getting tower_id from?  It looks like it's undefined.
3. Are you kicking the template off with an API call too?  That'd be the 
best way, then register the results and parse out the job ID from those 
results.

Something like
- API call to initiate template and register results into variable1
- API call to get the job output, using the variable to parse the job ID, 
then register those results to variable2
- Mail module to email the contents of variable2

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/663a4c04-4f6c-46a0-879c-7b8b45b8af86%40googlegroups.com.

Reply via email to