playbooks/clone-repo: added condition when repo is already cloned
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
1960187318
commit
35e28eb1a3
|
|
@ -30,9 +30,14 @@
|
|||
ansible.builtin.shell: |
|
||||
eval `ssh-agent -s`
|
||||
SSH_PASS={{ssh_passphrase}} DISPLAY=1 SSH_ASKPASS="{{ssh_auto_sshadd_file}}" ssh-add {{ssh_keyfile}} < /dev/null
|
||||
|
||||
if [[ ! -d {{git_repo_path}} ]]; then
|
||||
git clone ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git {{git_repo_path}}
|
||||
fi
|
||||
cd {{git_repo_path}}
|
||||
git checkout develop
|
||||
git fetch -ap
|
||||
git pull
|
||||
args:
|
||||
executable: /bin/bash
|
||||
no_log: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue