Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cschober.Mygit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schober-ansible
collections
Cschober.Mygit
Compare revisions
8478f23366cb1e40ad3c57fa721d66aef014304f to 7662c9aa3208e556ff9400a444573dfb5dd07e8f
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
schober-ansible/collections/cschober.mygit
Select target project
No results found
7662c9aa3208e556ff9400a444573dfb5dd07e8f
Select Git revision
Swap
Target
schober-ansible/collections/cschober.mygit
Select target project
schober-ansible/collections/cschober.mygit
1 result
8478f23366cb1e40ad3c57fa721d66aef014304f
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Move away from vars dir and make repo_name optional
· f66c2e50
Andreas Wölfl
authored
2 weeks ago
and
Christoph Schober
committed
2 weeks ago
f66c2e50
Merge branch 'hotfix/default-vars' into 'main'
· 7662c9aa
Christoph Schober
authored
2 weeks ago
Move away from vars dir and make repo_name optional See merge request
!1
7662c9aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/group_project/defaults/main.yml
+6
-1
6 additions, 1 deletion
roles/group_project/defaults/main.yml
roles/group_project/tasks/main.yml
+9
-4
9 additions, 4 deletions
roles/group_project/tasks/main.yml
roles/group_project/vars/main.yml
+0
-23
0 additions, 23 deletions
roles/group_project/vars/main.yml
with
15 additions
and
28 deletions
roles/group_project/defaults/main.yml
View file @
7662c9aa
#SPDX-License-Identifier: MIT-0
#
SPDX-License-Identifier: MIT-0
---
# defaults file for group_project
project_names
:
[]
parent_group
:
"
{{
projects_root_group
}}/{{
module.name
}}"
group
:
"
{{
parent_group
}}/{{
module.term
}}"
This diff is collapsed.
Click to expand it.
roles/group_project/tasks/main.yml
View file @
7662c9aa
...
...
@@ -16,14 +16,19 @@
# state: absent
-
name
:
"
Create
project
facts"
ansible.builtin.set_fact
:
project_names
:
"
{{
project_names
+
[group
+
'/'
+
item[0].name
+
'-'
+
item[1].repo_name]
}}"
project_names
:
>-
{{ project_names + [
group + '/' +
item[0].name +
('-' + item[1].repo_name if item[1].repo_name is defined and item[1].repo_name | length > 0 else '')
] }}
loop
:
"
{{
module.teams
|
product(module.repo_config)
|
list
}}"
-
name
:
"
Print
full
project
paths
"
ansible.builtin.debug
:
var
:
project_names
-
name
:
"
Create
projects"
community.general.gitlab_project
:
name
:
"
{{
item[0].name
}}
-
{{
item[1].repo_name
}}"
name
:
"
{{
item[0].name
}}{{
'-'
~
item[1].repo_name
if
item[1].repo_name
is
defined
else
''
}}"
group
:
"
{{
group
}}"
initialize_with_readme
:
false
import_url
:
"
{{
item[1].import_url
|
default('https://mygit.th-deg.de/schober-public/templates/student-repo.git')
}}"
...
...
@@ -32,7 +37,7 @@
loop
:
"
{{
module.teams
|
product(module.repo_config)
|
list
}}"
-
name
:
"
Set
branch
protection
level"
community.general.gitlab_protected_branch
:
project
:
"
{{
group
}}/{{
item[0].name
}}
-
{{
item[1].repo_name
}}"
project
:
"
{{
group
}}/{{
item[0].name
}}{{
'-'
~
item[1].repo_name
if
item[1].repo_name
is
defined
else
''
}}"
name
:
main
merge_access_levels
:
"
{{
item[1].merge_access_levels
}}"
push_access_level
:
"
{{
item[1].push_access_level
}}"
...
...
@@ -41,7 +46,7 @@
loop
:
"
{{
module.teams
|
product(module.repo_config)
|
list
}}"
-
name
:
"
Invite
user"
cschober.mygit.gitlab_invitation
:
gitlab_project
:
"
{{
group
}}/{{
item[0].name
}}
-
{{
item[1].repo_name
}}"
gitlab_project
:
"
{{
group
}}/{{
item[0].name
}}{{
'-'
~
item[1].repo_name
if
item[1].repo_name
is
defined
else
''
}}"
email
:
"
{{
item[0].users
}}"
state
:
present
access_level
:
"
{{
item[1].access_level
}}"
...
...
This diff is collapsed.
Click to expand it.
roles/group_project/vars/main.yml
View file @
7662c9aa
#SPDX-License-Identifier: MIT-0
---
# vars file for group_project
project_names
:
[]
gitlab_api_url
:
gitlab_api_token
:
projects_root_group
:
schober-teaching/student-projects
parent_group
:
"
{{
projects_root_group
}}/{{
module.name
}}"
group
:
"
{{
parent_group
}}/{{
module.term
}}"
module
:
name
:
term
:
repo_config
:
-
repo_name
:
import_url
:
access_level
:
developer
merge_access_levels
:
developer
push_access_level
:
developer
teams
:
-
name
:
users
:
This diff is collapsed.
Click to expand it.