My build and production deployment is connected using a keys by one user particular user that is shared across deployment and keys copied over during the machine spin up.
This user deploy, has ssh keys shared allowing ssh to any prod machine and between them.
Now my fabric build runs as user Jenkins.
How do I instruct fabric to execute everything as a particular user(deploy in this case)?The equivalent of sudo su deploy
I don’t want to do a prefix
or with
in every task. Rather set a global variable.
Jenkins is in the wheel group and has sudo perms