Commit 39cc8fda by arbabnazar

fixed the git clone error

parent 6d38dafe
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
fail: fail:
msg: '{{ GIT_REPOS.PROTOCOL }} must be "https" or "ssh"' msg: '{{ GIT_REPOS.PROTOCOL }} must be "https" or "ssh"'
when: (item.PROTOCOL != "https") and (item.PROTOCOL != "ssh") and GIT_REPOS is defined when: (item.PROTOCOL != "https") and (item.PROTOCOL != "ssh") and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}" with_items: GIT_REPOS
tags: tags:
- install - install
- install:code - install:code
- name: Install read-only ssh key - name: Install read-only ssh key
copy: copy:
dest: "{{ git_home }}/.ssh/{{ item.REPO }}" dest: "{{ git_home }}/.ssh/{{ item.REPO }}"
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
group: "{{ repo_group }}" group: "{{ repo_group }}"
mode: "0600" mode: "0600"
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}" with_items: GIT_REPOS
tags: tags:
- install - install
- install:code - install:code
...@@ -60,7 +61,7 @@ ...@@ -60,7 +61,7 @@
become_user: "{{ repo_owner }}" become_user: "{{ repo_owner }}"
register: code_checkout register: code_checkout
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}" with_items: GIT_REPOS
tags: tags:
- install - install
- install:code - install:code
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
become_user: "{{ repo_owner }}" become_user: "{{ repo_owner }}"
register: code_checkout register: code_checkout
when: item.PROTOCOL == "https" and GIT_REPOS is defined when: item.PROTOCOL == "https" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}" with_items: GIT_REPOS
tags: tags:
- install - install
- install:code - install:code
...@@ -83,7 +84,7 @@ ...@@ -83,7 +84,7 @@
dest: "{{ git_home }}/.ssh/{{ item.REPO }}" dest: "{{ git_home }}/.ssh/{{ item.REPO }}"
state: absent state: absent
when: item.PROTOCOL == "ssh" and GIT_REPOS is defined when: item.PROTOCOL == "ssh" and GIT_REPOS is defined
with_items: "{{ GIT_REPOS }}" with_items: GIT_REPOS
tags: tags:
- install - install
- install:code - install:code
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment