I have written an Ansible playbook that needs as one of its parameters the job number that is running it so that I make add a reference to the job to a database that I maintain. How can I get the Tower template to pass this to the playbook?
Here is my current solution which is not ideal:
I first kick off the template which contains my playbook using tower-cli
at which point the job number is returned to me. I then pass the job number as a parameter to another template which calls a playbook that writes the job number to the database.
Ideally I want to be able to run a single playbook via tower-cli
and not worry about the job number when doing so. I would like Tower to pass the job number to the original playbook so as not to require a second playbook. Any other solutions to this problem would also be appreciated.