I have upgraded fabric from fabric3==1.14.post1
to fabric=2.5.0
. Code works fine with fabric3==1.14.post1
.
And now i have a problem while executing tasks inner another tasks.
The problem is that, when i run task, task must update and install soft in remote server which connects without password(with public key, don't ask password!).
Old version(1.14.post1):
from fabric.api import task, sudo, env, run
@task
def install_docker():
sudo('apt-get update && apt-get install -qy docker.io')
@task
def task_queue():
execute(install_docker)
execute(install_some_soft)
How I run it: fab task_queue
New version(2.5.0)
@task
def install_docker(ctx):
ctx.sudo('apt-get update && apt-get install -qy docker.io')
@task(pre=[install_docker])
def task_queue(ctx):
pass
How I run it: fab task-queue
And i'm hiving error like this:
invoke.exceptions.AuthFailure: The password submitted to prompt '[sudo] password: ' was rejected.