Closed gnat closed 2 years ago
Hi @gnat - 100% agree with this the warning isn't showing in the expected scenarios. I'm not sure it's possible to reliably show these warnings at all as there's many different combinations of config/global args/etc. Will have a think about how best to handle this but maybe removing the warnings alltogether would be an improvement.
These were removed entirely a while back, the logic around when these are/aren't valid is too confusing.
Issue / Use Case
I frequently switch sudo on/off for my task scripts. This currently works flawlessly using
config.SUDO = True
andconfig.SUDO = False
I pre-fillconfig.USE_SUDO_PASSWORD
.Great for situations like:
config.SUDO = True
config.SUDO = False
The issue is when I
config.SUDO = False
pyinfra will print out:Of course I can suppress this by continually setting/unsetting
config.USE_SUDO_PASSWORD
but this is super inconvenient.Describe the solution you'd like
config.py
option to suppress this warning.Thanks!