Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Register debian repository using deb822_repository
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashuste committed May 3, 2024
1 parent ccd8da8 commit acc08a7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 41 deletions.
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,12 @@ gitlab_runner_pkg_version: "16.9.0-1"
The version to be used to determine the GitLab-Runner
[package](https://packages.gitlab.com/runner/gitlab-runner) (optional).
```yaml
gitlab_runner_apt_repo: "deb https://packages.gitlab.com/runner/gitlab-runner/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main"
```
The repository URL where to install the packages from.
```yaml
gitlab_runner_deb_file: ""
```
If this is specified the package will be installed from a `.deb`-file.
If `://` is in the path, Ansible will attempt to download deb before installing.

```yaml
gitlab_gpg_key_id: "F6403F6544A38863DAA0B6E03F01618A51312F3F"
```
Identifier of GPG key that was used to sign the packages.


```yaml
gitlab_gpg_old_key_ids: []
```
A list to specify expired GPG keys that should be absent.

```yaml
gitlab_runner_concurrent: 1
```
Expand Down
6 changes: 0 additions & 6 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@ gitlab_runner_version: ""

gitlab_runner_pkg_version: "{{ gitlab_runner_version + '-1' if gitlab_runner_version | length > 0 and gitlab_runner_version is version('16.9.0', 'ge') else gitlab_runner_version }}"

gitlab_runner_apt_repo: "deb https://packages.gitlab.com/runner/gitlab-runner/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main"

gitlab_runner_deb_file: ""

gitlab_gpg_key_id: "F6403F6544A38863DAA0B6E03F01618A51312F3F"

gitlab_gpg_old_key_ids: []

gitlab_runner_docker_machine_binary_url: "https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/releases/v0.16.2-gitlab.25/downloads/docker-machine-Linux-{{ ansible_architecture }}"

gitlab_runner_docker_machine_binary_checksum: "sha256:04cc18c8f6ee0d71614064fa81116f20f3a37af53eeebf19bfb832ab9c46d3a0"
Expand Down
1 change: 1 addition & 0 deletions molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- iproute2 # for gathering network facts
- ca-certificates # for Gitlab-Runner download
- gpg
- python3-debian
state: present
update_cache: yes
- name: Set up iptables
Expand Down
29 changes: 10 additions & 19 deletions tasks/install.debianlike.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,16 @@
when: gitlab_runner_deb_file | length == 0

block:
- name: Remove old runner/gitlab-runner GPG key
ansible.builtin.apt_key:
id: "{{ item }}"
state: absent
loop: "{{ gitlab_gpg_old_key_ids }}"

- name: Add runner/gitlab-runner GPG key
ansible.builtin.apt_key:
url: https://packages.gitlab.com/runner/gitlab-runner/gpgkey
id: "{{ gitlab_gpg_key_id }}"
state: present

- name: Add packages repository packages.gitlab.com/runner/gitlab-runner
ansible.builtin.apt_repository:
repo: "{{ gitlab_runner_apt_repo }}"
state: present
mode: '0644'
filename: gitlab-runner
update_cache: yes
- name: "Add packages repository packages.gitlab.com/runner/gitlab-runner"
ansible.builtin.deb822_repository:
name: "gitlab-runner"
types: "deb"
uris: "https://packages.gitlab.com/runner/gitlab-runner/{{ ansible_distribution | lower }}/"
suites: "{{ ansible_distribution_release }}"
components: "main"
signed_by: "https://packages.gitlab.com/runner/gitlab-runner/gpgkey"
state: "present"
enabled: true

- name: "Use APT pinning for Debian os"
ansible.builtin.template:
Expand Down

0 comments on commit acc08a7

Please sign in to comment.