From: Peter Palfrader Date: Tue, 29 Aug 2017 08:12:43 +0000 (+0200) Subject: Add factor to determine whether a host has a keyring.debian.org mirror X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=74c7428874fc82104d12976776af783762e5fdf8;p=mirror%2Fdsa-puppet.git Add factor to determine whether a host has a keyring.debian.org mirror --- diff --git a/modules/debian_org/lib/facter/services.rb b/modules/debian_org/lib/facter/services.rb new file mode 100644 index 000000000..8ad137e48 --- /dev/null +++ b/modules/debian_org/lib/facter/services.rb @@ -0,0 +1,7 @@ +Facter.add("keyring_debian_org_mirror") do + setcode do + FileTest.exist?("/srv/keyring.debian.org") and + File.stat("/srv/keyring.debian.org").uid == 0 and + FileTest.exist?("/var/lib/misc/thishost/debian-keyring.gpg") + end +end