I followed the docs example to add a module as with the time.py example.
So I have:
I followed the docs example to add a module as with the time.py example.
So I have:
Since “time” is part of the Python standard library and it is imported from various places within ansible you should not have a module named time.py since puthon will try to use that file as the file to satisfy “import time”.
This wouldn’t have been a problem before modules had .py extensions. I imagine the docs should probably be updated to name this something other than time.py
Yep, that’s a good suggestion.
Can you either please file a ticket on github.com/ansible/ansible or submit a pull request that changes the docs (.rst files in the code tree) to say something like “timecheck” ?
I think this ordinarily won’t happen anyway, but the module happened to be in your PYTHON_PATH. Usually this wouldn’t be the case but it would be nice to step around the possible confusion for others finding this in the dev docs.
Appreciate the heads up!