Every time fabric runs, it asks for root password, can it be sent along same for automated proposes.
fab staging test
It is possible to store the password securely in the operating system keyring service with the keyring module, the password can then be automatically retrieved and used in fabfile.py.
You first need to store the password in the keyring, for example using the Python shell:
>>> import keyring
>>> keyring.set_password('some-host', 'some-user', 'passwd')
Then you can use it in fabfile.py, for example with Fabric 2:
from fabric import task
import keyring
@task
def restart_apache(connection):
connection.config.sudo.password = keyring.get_password(connection.host, 'some-user')
connection.sudo('service apache2 restart')