From ee642a94c5fee9c62fce7d4b17df92ee21b12726 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 19 Aug 2024 10:19:18 -0300 Subject: Fix: use the recommended APT keyrings folder --- manifests/ce.pp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/manifests/ce.pp b/manifests/ce.pp index 25a2204..99b6935 100644 --- a/manifests/ce.pp +++ b/manifests/ce.pp @@ -2,7 +2,16 @@ class docker::ce inherits docker { $distro = downcase($::lsbdistid) + # Old location file { '/etc/apt/trusted.gpg.d/docker.gpg': + ensure => absent, + mode => '0644', + owner => 'root', + group => 'root', + source => "puppet:///modules/docker/${distro}.gpg", + } + + file { '/etc/apt/keyrings/docker.gpg': ensure => present, mode => '0644', owner => 'root', @@ -15,8 +24,8 @@ class docker::ce inherits docker { owner => "root", group => "root", mode => "0644", - content => "deb [arch=${::architecture}] https://download.docker.com/linux/${distro} ${::lsbdistcodename} stable\n", - require => File['/etc/apt/trusted.gpg.d/docker.gpg'], + content => "deb [signed-by=/etc/apt/keyrings/docker.gpg arch=${::architecture}] https://download.docker.com/linux/${distro} ${::lsbdistcodename} stable\n", + require => File['/etc/apt/keyrings/docker.gpg'], notify => Exec['docker-apt-auto-update'], } -- cgit v1.2.3