community.general.gitlab_runners – Ansible dynamic inventory plugin for GitLab runners.¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.gitlab_runners
.
Synopsis¶
Reads inventories from the GitLab API.
Uses a YAML configuration file gitlab_runners.[yml|yaml].
Requirements¶
The below requirements are needed on the local controller node that executes this inventory.
python >= 2.7
python-gitlab > 1.8.0
Parameters¶
Examples¶
# gitlab_runners.yml
plugin: community.general.gitlab_runners
host: https://gitlab.com
# Example using constructed features to create groups and set ansible_host
plugin: community.general.gitlab_runners
host: https://gitlab.com
strict: False
keyed_groups:
# add e.g. amd64 hosts to an arch_amd64 group
- prefix: arch
key: 'architecture'
# add e.g. linux hosts to an os_linux group
- prefix: os
key: 'platform'
# create a group per runner tag
# e.g. a runner tagged w/ "production" ends up in group "label_production"
# hint: labels containing special characters will be converted to safe names
- key: 'tag_list'
prefix: tag
Authors¶
Stefan Heitmüller (@morph027) <stefan.heitmueller@gmx.com>