Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Ansible GAP CI runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
GÉANT Orchestration and Automation Team
Development Playbooks
Ansible GAP CI runner
Commits
4c22e66e
Verified
Commit
4c22e66e
authored
2 years ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
Update: will now register runner using non-deprecated token method
parent
40494471
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
group_vars/ci-runners.yml.example
+2
-3
2 additions, 3 deletions
group_vars/ci-runners.yml.example
inventory.yml
+2
-3
2 additions, 3 deletions
inventory.yml
roles/gitlab-runner/tasks/main.yml
+17
-4
17 additions, 4 deletions
roles/gitlab-runner/tasks/main.yml
with
21 additions
and
10 deletions
group_vars/ci-runners.yml.example
+
2
−
3
View file @
4c22e66e
runner:
runner:
gitlab_url: 'https://gitlab.geant.org/'
gitlab_url: 'https://gitlab.geant.org/'
git_project_name: 'nat/gap'
access_token: xxx
access_token: xxx
registration_token: xxx
registration_token: xxx
runner_tags:
executor: shell
- gap
- nat
This diff is collapsed.
Click to expand it.
inventory.yml
+
2
−
3
View file @
4c22e66e
ci-runners
:
ci-runners
:
hosts
:
hosts
:
test-nat-ci01
:
nat-runner-01
:
ansible_host
:
ansible_host
:
nat-runner-01
test-nat-ci01
This diff is collapsed.
Click to expand it.
roles/gitlab-runner/tasks/main.yml
+
17
−
4
View file @
4c22e66e
...
@@ -18,17 +18,30 @@
...
@@ -18,17 +18,30 @@
ansible.builtin.pip
:
ansible.builtin.pip
:
name
:
python-gitlab
name
:
python-gitlab
-
name
:
Register runner
-
name
:
Request runner token
no_log
:
true
community.general.gitlab_runner
:
community.general.gitlab_runner
:
api_url
:
'
{{
runner.gitlab_url
}}'
api_url
:
'
{{
runner.gitlab_url
}}'
api_token
:
'
{{
runner.access_token
}}'
api_token
:
'
{{
runner.access_token
}}'
registration_token
:
'
{{
runner.registration_token
}}'
registration_token
:
'
{{
runner.registration_token
}}'
description
:
'
{{
inventory_hostname_short
}}'
description
:
'
{{
inventory_hostname_short
}}'
project
:
'
nat/gap
'
project
:
'
{{
runner.git_project_name
}}
'
state
:
present
state
:
present
tag_list
:
'
{{
runner.
runner_tags
+
[inventory_hostname_short]
}}
'
tag_list
:
'
{{
runner.
executor
}}-executor
'
run_untagged
:
false
run_untagged
:
false
locked
:
true
locked
:
true
access_level_on_creation
:
true
access_level_on_creation
:
true
access_level
:
'
not_protected'
access_level
:
'
not_protected'
no_log
:
true
register
:
gitlab_authentication_response
-
name
:
Register GitLab
ansible.builtin.command
:
argv
:
-
gitlab-runner
-
register
-
'
--url={{
runner.gitlab_url
}}'
-
'
--token={{
gitlab_authentication_response.runner.token
}}'
-
'
--executor={{
runner.executor
}}'
-
'
--non-interactive'
become
:
true
no_log
:
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment