gitlab_runner – Create, modify and delete GitLab Runners¶
New in version 2.8.
Synopsis¶
Register, update and delete runners with the GitLab API.
All operations are performed using the GitLab API v4.
For details, consult the full API documentation at https://docs.gitlab.com/ee/api/runners.html.
A valid private API token is required for all operations. You can create as many tokens as you like using the GitLab web interface at https://$GITLAB_URL/profile/personal_access_tokens.
A valid registration token is required for registering a new runner. To create shared runners, you need to ask your administrator to give you this token. It can be found at https://$GITLAB_URL/admin/runners/.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
python-gitlab <= 1.12.1
Parameters¶
Notes¶
Note
To create a new runner at least the
api_token
,description
andurl
options are required.Runners need to have unique descriptions.
Examples¶
- name: "Register runner"
gitlab_runner:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
registration_token: 4gfdsg345
description: Docker Machine t1
state: present
active: True
tag_list: ['docker']
run_untagged: False
locked: False
- name: "Delete runner"
gitlab_runner:
api_url: https://gitlab.example.com/
api_token: "{{ access_token }}"
description: Docker Machine t1
state: absent
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Samy Coenen (@SamyCoenen)
Guillaume Martinez (@Lunik)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.