Local host environment: CentOS 7, Python 3.5.1, Fabric3 (1.11.1.post1)
Remote Host Environment: CentOS 7
fibfile:
def fuc(): reboot()
bash:
fab -f fibfile.py -H host -u root -p password
The remote host rebooted, but returns fatalError:
sudo() received nonzero return code -1 while executing 'reboot'!
Now I use warn_only to prevent the crash:
fabfile:
def test(): with settings(warn_only=True): reboot()
source share