Updated to create project for gitlab and share with group
diff --git a/private-gitlab-repository-create-update.yml b/private-gitlab-repository-create-update.yml index e33496a..d3bf210 100644 --- a/private-gitlab-repository-create-update.yml +++ b/private-gitlab-repository-create-update.yml
@@ -11,6 +11,7 @@ - private-repository-user-list.yml tasks: - name: Create Gitlab repositories if necessary + tags: ['create'] register: repos uri: url: "{{ repository_secure_endpoint_https }}/projects?name={{ item }}" @@ -27,6 +28,7 @@ - "{{ role_repos }}" - name: Git checkout of configuration repositories + tags: ['checkout'] become: false git: repo: '{{ github_endpoint_https }}/{{ item.repo_name }}.git' @@ -38,6 +40,7 @@ - "{{ role_repos }}" - name: Add second git host as remote repo + tags: ['add-remote'] ignore_errors: true shell: "git remote add gitlab {{ repository_secure_endpoint_ssh }}/{{ item.repo_name }}.git" args: @@ -45,6 +48,7 @@ with_items: "{{ repo_names }}" - name: Pull from second git host if the repo is already there + tags: ['remote-refresh'] ignore_errors: yes shell: "git pull gitlab master" args: @@ -52,6 +56,7 @@ with_items: "{{ repo_names }}" - name: Commit updated repos to second git host + tags: ['commit'] shell: "git checkout master && git push -u gitlab master" args: chdir: "{{ item.workspace }}/{{ item.repo_name }}"