Skip to content

Commit

Permalink
Merge pull request #11 from EDITD/force
Browse files Browse the repository at this point in the history
Add default var for force=yes and use it when cloning repo
  • Loading branch information
pkatseas committed Sep 26, 2016
2 parents bedc5a6 + 37b6ae5 commit d3c7f63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ git_application_version: master
git_application_user: myuser
git_application_group: myusergroup

git_application_pull_from_git: yes
git_application_pull_from_git: yes
git_application_force: yes
7 changes: 6 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
# We need to run the git clone as the ansible ssh user. Otherwise we won't
# get the agent forwarding.
- name: clone repo to application directory
git: dest={{ git_application_deploy_to }} repo={{ git_application_repo }} version={{ git_application_version }} accept_hostkey=yes
git: >
dest={{ git_application_deploy_to }}
repo={{ git_application_repo }}
version={{ git_application_version }}
accept_hostkey=yes
force={{ git_application_force }}
sudo: no
when: git_application_pull_from_git == True

Expand Down

0 comments on commit d3c7f63

Please sign in to comment.