This seems to be a different question. Since this is about writing modules, would you mind asking on ansible-devel?
Apologies on being the list cop but this is a very active list, and I also want to encourage the devel list a bit. Thanks! On Mon, Sep 8, 2014 at 6:15 PM, Tiglath <[email protected]> wrote: > > I used the code of the 'user' module to try, and it works, unfortunately I > wanted to prompt the user for the args and the custom module can't seem to > do an interactive session. > > The var_prompt module is not really suitable, for what I see. I have to > get 4 answers and a lot of work to validate them in between, that's why I > think it's best to do that in Python, then pass to Ansible the arguments to > use in the deployment and fire it off. Looks like I'll have to > use --extra_vars to pass the args to Ansible. Pity, a custom module > sounded neat. > > Thanks > > On Monday, September 8, 2014 3:42:48 PM UTC-4, Michael DeHaan wrote: > >> Easiest would be to write a fact module, and return a JSON response that >> contains the dictionary "ansible_facts". Register does not need to be used >> with these modules. >> >> Take a look at any module in the tree ending in "_facts" for an example, >> the setup module is a special case of those, that is called automatically. >> >> --Michael >> >> On Mon, Sep 8, 2014 at 2:37 PM, Tiglath <[email protected]> wrote: >> >>> >>> I know that >>> >>> register: var >>> >>> Allows to reference var.stdout, but... >>> >>> Say I call a python script that prints to stdout more than one argument >>> as in a tuple : (arg1, arg2, arg3) >>> >>> How can I get that into individual variables in Ansible? >>> >>> Thanks >>> >>> >>> >>> >>> >>> -- >>> 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 post to this group, send email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ >>> msgid/ansible-project/09e3b12b-acda-4a70-8c53- >>> 61132cc298db%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/09e3b12b-acda-4a70-8c53-61132cc298db%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/4c3329a4-370a-4616-851c-f1602f55f9c6%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/4c3329a4-370a-4616-851c-f1602f55f9c6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgytq%2BUOc%2B9idXPkekrUnckWdqSpXzAsf4PyaKusyQD-mA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
