--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project+unsubscribe@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1d1bddb5-4715-4fd3-9042-f796d165b20a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/CAADLLLi-VcTLmFHDwwXXwKRLFOrg1XcB0Sz_XCnJGc1HnvC%2B7Q%40mail.gmail.com.
There are also inventory source options that can be set and are available as an input box when setting up the inventory source.
On Tue, Mar 13, 2018 at 7:40 AM, Alan Rominger <arom...@redhat.com> wrote:
There is not an option to pass arguments directly, since Ansible itself does not allow this in any sense that I know of.Instead, you can pass values through environment variables. This is the most common way that Ansible inventory scripts take inputs.To do this in AWX, create a new credential type, and in here, define the environment variable structure you need. Then create a credential of this type. Then attach that credential to your inventory source. The script that runs should read from os.environ or something like that to take in the values. Here are some examples
Alangithub: AlanCoding
On Tue, Mar 13, 2018 at 3:34 AM, MarcG <m...@marcosg.com> wrote:
Hi, I have written a inventory script written in Python, that I am using in AWX.
What I would like to do is pass some arguments to it some how to set some variables used within the script.
I know that AWX runs the script with the —list flag. Is there a way to pass other arguments to it from say a job template or elsewhere within AWX?
Many thanks
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To post to this group, send email to awx-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/1d1bddb5-4715-4fd3-9042-f796d165b20a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "AWX Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to awx-project...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/awx-project/CAADLLLi-VcTLmFHDwwXXwKRLFOrg1XcB0Sz_XCnJGc1HnvC%2B7Q%40mail.gmail.com.