I'll admit, this playbook is running in Ansible Tower, which is where I'm 
getting tower_id from.  I know that I could reach out to Red Hat for Tower 
questions, but in the past I've had them reject my support requests for 
these types of questions.  They say that they don't support with any 
playbook code/authoring, which is why I was reaching out here.

I tried the URI module and got the same error.  Basically, I want to email 
the stdout of a playbook, so do I need to spawn a new playbook to do that?

Thanks,
Harry

On Thursday, September 5, 2019 at 12:22:16 PM UTC-4, Cade Lambert wrote:
>
> 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/e37d3ecb-629c-4753-8435-d21fa8c7ac13%40googlegroups.com.

Reply via email to