Skip to content
Snippets Groups Projects
Commit a5422352 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

Add --docker-image flag to tasks

parent 1ed3f9de
Branches main
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ your choice. ...@@ -10,7 +10,7 @@ your choice.
2. Get the ip address of the new VM, and configure your ssh environment 2. Get the ip address of the new VM, and configure your ssh environment
3. Create & activate a python virtual environment and install ansible 3. Create & activate a python virtual environment and install ansible
4. Update inventory.yml so that your VM is defined in the "gitlab-runner" group 4. Update inventory.yml so that your VM is defined in the "gitlab-runner" group
5. Create the file `group_vars/ci-runners.yml` following the [example file](group_vars/ci-runners.yml.example) given 5. Create the file `group_vars/ci_runners.yml` following the [example file](group_vars/ci_runners.yml.example) given
* Consider the type of executor you want/need (docker, shell, etc.) * Consider the type of executor you want/need (docker, shell, etc.)
* More info on GitLab runner executors can be found [here](https://docs.gitlab.com/runner/executors/) * More info on GitLab runner executors can be found [here](https://docs.gitlab.com/runner/executors/)
* This requires acquiring an access token to the GitLab instance for which you want to set up a runner * This requires acquiring an access token to the GitLab instance for which you want to set up a runner
......
ci-runners: ci_runners:
hosts: hosts:
nat-runner-01: nat-runner-01:
ansible_host: nat-runner-01 ansible_host: nat-runner-01
- name: Install and set up a GitLab CI runner - name: Install and set up a GitLab CI runner
hosts: ci-runners hosts: ci_runners
become: true become: true
roles: roles:
- gitlab-runner - gitlab-runner
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
- '--url={{ runner.gitlab_url }}' - '--url={{ runner.gitlab_url }}'
- '--token={{ gitlab_authentication_response.runner.token }}' - '--token={{ gitlab_authentication_response.runner.token }}'
- '--executor={{ runner.executor }}' - '--executor={{ runner.executor }}'
- '--docker-image=alpine:latest'
- '--non-interactive' - '--non-interactive'
become: true become: true
no_log: true no_log: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment