pass ansible the "raw" git repo url

* I explored the |urlencode() filter instead. Ansible and git didn't
like this.
* Quoting doesn't seemed to be required. Ansible and the git module are
smart enough to do the right thing. I tested with a space in the repo
url path and it works.
This commit is contained in:
Chris Meyers
2017-03-06 15:56:39 -05:00
parent 388b0fdf04
commit c255c07ea5

View File

@@ -25,7 +25,7 @@
- name: update project using git and accept hostkey - name: update project using git and accept hostkey
git: git:
dest: "{{project_path|quote}}" dest: "{{project_path|quote}}"
repo: "{{scm_url|quote}}" repo: "{{scm_url}}"
version: "{{scm_branch|quote}}" version: "{{scm_branch|quote}}"
force: "{{scm_clean}}" force: "{{scm_clean}}"
accept_hostkey: "{{scm_accept_hostkey}}" accept_hostkey: "{{scm_accept_hostkey}}"
@@ -42,7 +42,7 @@
- name: update project using git - name: update project using git
git: git:
dest: "{{project_path|quote}}" dest: "{{project_path|quote}}"
repo: "{{scm_url|quote}}" repo: "{{scm_url}}"
version: "{{scm_branch|quote}}" version: "{{scm_branch|quote}}"
force: "{{scm_clean}}" force: "{{scm_clean}}"
#clone: "{{ scm_full_checkout }}" #clone: "{{ scm_full_checkout }}"