Closed 4bo closed 2 years ago
trying to run a simple command on a debian 10 target by pyinfra 1.4:
pyinfra myserver apt.packages iotop sudo=True
i get:
--> Loading config... --> Loading inventory... --> Connecting to hosts... [myserver] Connected --> Preparing operation... [myserver] sudo: a password is required [myserver] Error: could not load fact: deb_packages --> pyinfra error: No hosts remaining!
the problem is with sudo part, non sudo commands is ok
@4bo if you add use_sudo_password=true it should prompt for the password so this will work!
use_sudo_password=true
Currently there is no automatic detection of when a sudo password is required; there's an issue tracking this here.
trying to run a simple command on a debian 10 target by pyinfra 1.4:
i get:
the problem is with sudo part, non sudo commands is ok