New in version 2.8.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
access_level string |
| Determines if a runner can pick up jobs from protected branches. |
active boolean |
| Define if the runners is immediately active after creation. |
api_password string | The password to use for authentication against the API | |
api_token string / required | Your private token to interact with the GitLab API. aliases: private_token | |
api_url string | The resolvable endpoint for the API | |
api_username string | The username to use for authentication against the API | |
description string / required | The unique name of the runner. aliases: name | |
locked boolean |
| Determines if the runner is locked or not. |
maximum_timeout integer | Default: 3600 | The maximum timeout that a runner has to pick up a specific job. |
registration_token string / required | The registration token is used to register new runners. | |
run_untagged boolean |
| Run untagged jobs or not. |
state string |
| Make sure that the runner with the same name exists with the same configuration or delete the runner with the same name. |
tag_list list | Default: [] | The tags that apply to the runner. |
url string | The URL of the GitLab server, with protocol (i.e. http or https). | |
validate_certs boolean |
| Whether or not to validate SSL certs when supplying a https endpoint. |
Note
api_token
, description
and url
options are required.- 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
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
error string | failed | the error message returned by the GitLab API Sample: 400: path is already in use |
msg string | always | Success or failure message Sample: Success |
result dictionary | always | json parsed response from the server |
runner dictionary | always | API object |
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/gitlab_runner_module.html