updated to ignore if the remote repo was already added.
diff --git a/bitbucket-create-repos.yml b/bitbucket-create-repos.yml index 3f2e046..67cbc4c 100644 --- a/bitbucket-create-repos.yml +++ b/bitbucket-create-repos.yml
@@ -25,18 +25,19 @@ forkable: True with_items: "{{ repo_names }}" - - name: Add Onestash as remote repo - shell: "git remote add vz ssh://git@onestash.verizon.com:7999/celvw/{{ item.repo_name }}.git" - args: - chdir: "{{ item.workspace }}/{{ item.repo_name }}" - with_items: "{{ repo_names }}" - - name: Add permissions to repos include: bitbucket-add-user-permission.yml with_items: "{{ repo_users }}" loop_control: loop_var: repo_user + - name: Add Onestash as remote repo + ignore_errors: true + shell: "git remote add vz ssh://git@onestash.verizon.com:7999/celvw/{{ item.repo_name }}.git" + args: + chdir: "{{ item.workspace }}/{{ item.repo_name }}" + with_items: "{{ repo_names }}" + - name: Commit updated repos to onestash shell: "git checkout master && git push -u vz master" args: