From 065fe78435b7bb3b5780d8b3cfce9006f66fb944 Mon Sep 17 00:00:00 2001
From: ynerant <ynerant@crans.org>
Date: Thu, 11 Feb 2021 15:48:21 +0100
Subject: [PATCH] [gitlab] Import Gitlab GPG public key

Signed-off-by: ynerant <ynerant@crans.org>
---
 roles/gitlab/tasks/main.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/roles/gitlab/tasks/main.yml b/roles/gitlab/tasks/main.yml
index 9f22e1aa..65d0e1da 100644
--- a/roles/gitlab/tasks/main.yml
+++ b/roles/gitlab/tasks/main.yml
@@ -1,4 +1,19 @@
 ---
+- name: Install GPG and apt-transport-https
+  apt:
+    update_cache: true
+    install_recommends: false
+    name:
+      - apt-transport-https
+      - gnupg
+  register: apt_result
+  retries: 3
+  until: apt_result is succeeded
+
+- name: Import Gitlab public key
+  apt_key:
+    url: https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
+
 - name: Configure Gitlab repository
   template:
     src: apt/sources.list.d/gitlab_gitlab-ce.list.j2
-- 
GitLab