diff --git a/README.md b/README.md index 8fc1e612459d560e701c47499b461288ce5898c0..42ff3dd7355ddbd47072b00f1277075be447d7d2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ your choice. 2. Get the ip address of the new VM, and configure your ssh environment 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 - 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.) * 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 diff --git a/group_vars/ci-runners.yml.example b/group_vars/ci_runners.yml.example similarity index 100% rename from group_vars/ci-runners.yml.example rename to group_vars/ci_runners.yml.example diff --git a/inventory.yml b/inventory.yml index 2b6b69057e2056991256dde39df6c63d68654e9f..93131c69b730b16a8cd3325fd52cfc083ccdd60f 100644 --- a/inventory.yml +++ b/inventory.yml @@ -1,4 +1,4 @@ -ci-runners: +ci_runners: hosts: nat-runner-01: ansible_host: nat-runner-01 diff --git a/playbook.yml b/playbook.yml index ffe8d2e3b3f34efcc5d5230cddd72dd06c66e49a..deb61e67ee0b6ae948e0eec2f97ad7e7734f2e75 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,5 +1,5 @@ - name: Install and set up a GitLab CI runner - hosts: ci-runners + hosts: ci_runners become: true roles: - gitlab-runner diff --git a/roles/gitlab-runner/tasks/main.yml b/roles/gitlab-runner/tasks/main.yml index 997fbf9650f1b9d1f6d925e340614214c554ceb6..b3d3991c51a46712e71144d785c73938979188fc 100644 --- a/roles/gitlab-runner/tasks/main.yml +++ b/roles/gitlab-runner/tasks/main.yml @@ -42,6 +42,7 @@ - '--url={{ runner.gitlab_url }}' - '--token={{ gitlab_authentication_response.runner.token }}' - '--executor={{ runner.executor }}' + - '--docker-image=alpine:latest' - '--non-interactive' become: true no_log: true