Pushes current branch of git repo from local machine to remote machine (or local VM). Useful for workflows like:
- Develop in local repo
- Push repo to remote machine
- Compile/install the application
- Run the application/tests
- GOTO 1.
This role is useful for step 2, you probably also want ansible to perform steps 3 and possibly 4.
Git on remote machine. Sshd listening on the remote machine.
local_git_deploy_local_repo
(required): Path to the repository on local machine.local_git_deploy_remote_repo
(required): Path to the repository on remote machine.local_git_deploy_remote_branch
: (defaultdeploy
): Name of the branch on the remote machine to push to.local_git_deploy_ssh_port
(default 22): SSH port to use when connecting to remote machine.
No dependencies?
- hosts: myservice-devel
roles:
- role: local_git_deploy
local_git_deploy_local_repo: /home/jdoe/repos/myservice
local_git_deploy_remote_repo: /opt/myservice
WTFPL
- Martin Milata
<b42@srck.net>