blob: fed5e33140d38ab79c12b69454ede81b23a217f9 [file] [log] [blame]
---
- name: Update git remote repos with provided url
hosts: localhost
connection: local
gather_facts: no
vars_files:
- repository-mapping-name-folder.yml
- repository-custom-properties.yml
tasks:
- name: Remove existing origin repo
shell: "git remote remove origin"
args:
chdir: "{{ item.workspace }}/{{ item.repo_name }}"
with_items:
- "{{ playbook_repos }}"
- "{{ role_repos }}"
- name: Add updated origin repo
shell: "git remote add origin {{ repository_secure_endpoint_ssh }}/{{ item.repo_name }}.git"
args:
chdir: "{{ item.workspace }}/{{ item.repo_name }}"
with_items:
- "{{ playbook_repos }}"
- "{{ role_repos }}"