The module is sitting in /usr/share/ansible in the root and it does have a .py. The module is ans_check_dis.py.
The playbook calls the module just fine, however nothing was working and it's complaining about the variables being empty. So I put a 30 second wait into the module so that I could check the arguments file and I found that it's empty. Here is the main.yml from my tasks folder: --- - name: Run the Command on the switch ans_check_dis.py: On Monday, September 22, 2014 4:43:43 PM UTC-7, Michael DeHaan wrote: > > Hi Joseph, > > It won't matter, but typical convention is to not have modules end in > ".py", but it seems like your problem may be that it's not in the module > path. > > This is configured in Ansible.cfg, or you can just drop the module into a > "./library" directory alongside your playbook. > > I'd have to see the line from the playbook to see if you were having a > specific problem with the invocation, but my guess is that's the problem. > > If that's not it, I'd need more information about what "doesn't work" > means in your case. > > Thanks! > > On Mon, Sep 22, 2014 at 5:15 PM, Joseph Jenkins <[email protected] > <javascript:>> wrote: > >> I created an Ansible module in python that works correctly when I call it >> from the command line with: >> >> ansible routers -m ans_check_dis.py -a 'user=someuser host=somehost >> password=somepassword' -k >> >> Now I am trying to build this into a playbook to be called and have the >> variables used as the arguments for the module. I have tried a bunch of >> different iterations and tried searching for it and can't seem to find how >> to make this work. Any recommendations or guidance would be greatly >> appreciated. >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/60e7e71f-705a-44e3-af22-498259cb7ef8%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/60e7e71f-705a-44e3-af22-498259cb7ef8%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/94c64e96-9054-419e-bf8e-5852402b65ea%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
