aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-19 10:19:18 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-19 10:19:18 -0300
commitee642a94c5fee9c62fce7d4b17df92ee21b12726 (patch)
tree98838626b8f55876257ef230a4c3139aa9a48a65
parent20b7cb7c949a89f2d6636366554e024b5a0ad0b2 (diff)
downloadpuppet-docker-master.tar.gz
puppet-docker-master.tar.bz2
Fix: use the recommended APT keyrings folderHEADmaster
-rw-r--r--manifests/ce.pp13
1 files 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'],
}