--- - name: add gpg key ansible.builtin.apt_key: url: https://packages.gitlab.com/runner/gitlab-runner/gpgkey tags: gitlab-runner - name: add repository ansible.builtin.apt_repository: repo: '{{ gitlab_runner_repository }}' tags: gitlab-runner - name: install package ansible.builtin.package: name: - gitlab-runner environment: GITLAB_RUNNER_DISABLE_SKEL: 'true' tags: gitlab-runner - name: register runners gitlab_runner: name: '{{ item.name }}' url: '{{ item.url }}' token: '{{ item.token }}' executor: '{{ item.executor }}' options: '{{ item.options|default({}) }}' state: '{{ item.state|default("present") }}' loop: '{{ gitlab_runner_runners }}' loop_control: label: '{{ item.name }}' tags: gitlab-runner - name: enable and start service ansible.builtin.service: name: gitlab-runner state: started enabled: true tags: gitlab-runner