From 5ce8d7cfa0c9b9c26df877144a8adffa0aca8b08 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen@paragon-es.de> Date: Sat, 27 Oct 2018 13:05:46 +0200 Subject: [PATCH] Initial role to install gitlab-runner --- tasks/main.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tasks/main.yml diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..eafccc1 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,31 @@ +## +# Ansible file to install GitLab Runner +# + +--- +# file: roles/gitlab-runner/tasks/main.yml + +- name: "GitLab Runner Role" + set_fact: role_gitlab_runner_started=true + tags: 'always' + +- block: + + - name: "Apt Key" + apt_key: + url: 'https://packages.gitlab.com/runner/gitlab-runner/gpgkey' + state: present + + - name: "Apt Repository" + apt_repository: + repo: 'deb https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ {{ ansible_distribution_release }} main' + state: 'present' + mode: '644' + + - name: "Install SpiderOak Agent" + apt: + pkg: 'gitlab-runner' + state: 'present' + update_cache: yes + + when: '"gitlab-runner" not in excluded_roles' -- GitLab