-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation guidelines will break all other modules/playbooks #142
Comments
Hi @spikedrba , sorry for the delay in coming back to you! Do you know if this happen with both |
Ah, I had forgotten about this issue, it stopped me from trying ntc-ansible for a while when I encountered this. I think it is probably more an issue in ansible than ntc, but if you try to use the repo folder directly, the setup.py (in both ntc and ntc-templates) and even the setup.cfg file would get loaded by execute_module. Renaming those files works around this (DISABLE-), but I think the real fix would be in ansible to rename the setup module to something less generic or perhaps have a tighter search path for core modules :( |
Ran into this also today. I had to rename the files as mentioned ntc-ansible/setup.py, setup.cfg and ntc-templates/ setup.cfg so that ansible would work. I wasn't even calling any of the ntc-ansible modules in my playbooks at the time. |
hey @GGabriele , was away for a month, thanks for your patience. I don't understand the question about pip Vs clone. The git clone in ansible's module path is a requirement as far as I understand per your installation/setup instructions in the README, which is what I did when I set it up. Pip is only to install dependencies etc, but it won't change that doing the git pull will populate the ntc-ansible dir inside the ansible's module path with a setup.py file. hope that helps, Spike |
Updated Readme to note this issue (and work around), and have been attempting to get ansible to change their setup.py to gather_facts.py. @GGabriele should be able to close this since it is a known issue and workaround is documented. |
Hi,
I just installed ntc, worked with it for a while and then went back working with other playbooks. When I ran one I got back this error:
soon after that I realized that none of my playbook was working anymore. Since installing ntc was the lat change I made I undid it and everything started working again.
Eventually I tracked down the problem to the fact that the installation guidelines from git also includes a setup.py in the module dir. When working with ntc gather_facts is false so everything works, but when gather_facts is true and setup is ran, because ntc is in the library path, its setup.py gets loaded instead of ansible's setup module, producing the error above.
I can confirm this by deleting setup.py both in ntc-ansible and ntc-templates. When both are gone all my standard playbooks that gather_facts worked again.
I don't know what an appropriate fix is but for now it may be worth to point this out in the installation guidelines.
best,
The text was updated successfully, but these errors were encountered: