aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystem
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-19 09:48:40 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-19 09:48:40 -0300
commit8cf2fef7ecefa4cff9ae1545eddc9a07c0dc4fc0 (patch)
tree6b738c70e06ffeefa14021f34941d260ecb645c5 /manifests/subsystem
parent20658b1f3e41f2b1f7b0d796ac72f45c36d03730 (diff)
downloadpuppet-nodo-8cf2fef7ecefa4cff9ae1545eddc9a07c0dc4fc0.tar.gz
puppet-nodo-8cf2fef7ecefa4cff9ae1545eddc9a07c0dc4fc0.tar.bz2
Changes on Tor, Signal and APT repository handling
Diffstat (limited to 'manifests/subsystem')
-rw-r--r--manifests/subsystem/apt/repo.pp24
1 files changed, 20 insertions, 4 deletions
diff --git a/manifests/subsystem/apt/repo.pp b/manifests/subsystem/apt/repo.pp
index ca8f5e1..d6e03c0 100644
--- a/manifests/subsystem/apt/repo.pp
+++ b/manifests/subsystem/apt/repo.pp
@@ -1,15 +1,31 @@
define nodo::subsystem::apt::repo(
$definition,
$key_source,
- $ensure = present,
+ $keyrings_folder = '/etc/apt/keyrings',
+ $ensure = present,
) {
- file { "/etc/apt/trusted.gpg.d/${name}.gpg":
+ # The recommended locations for keyrings are /usr/share/keyrings for keyrings
+ # managed by packages, and /etc/apt/keyrings for keyrings managed by the
+ # system operator. If no keyring files are specified the default is the
+ # trusted.gpg keyring and all keyrings in the trusted.gpg.d/ directory (see
+ # apt-key fingerprint).
+ #
+ # -- sources.list(5)
+ file { "${keyrings_folder}/${name}.gpg":
ensure => $ensure,
owner => "root",
group => "root",
mode => "0644",
source => $key_source,
- notify => Exec["apt-repo-auto-update-${name}"],
+ }
+
+ # Old location
+ file { "/etc/apt/trusted.gpg.d/${name}.gpg":
+ ensure => absent,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ source => $key_source,
}
file { "/etc/apt/sources.list.d/${name}.list":
@@ -18,7 +34,7 @@ define nodo::subsystem::apt::repo(
group => "root",
mode => "0644",
content => "${definition}\n",
- require => [ File["/etc/apt/trusted.gpg.d/${name}.gpg"], Package['apt-transport-https'] ],
+ require => [ File["${keyrings_folder}/${name}.gpg"], Package['apt-transport-https'] ],
notify => Exec["apt-repo-auto-update-${name}"],
}