X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fdebian-org%2Flib%2Ffacter%2Fpaths.rb;h=a330c30136f41533c4e0cd9e373e834ea1715685;hb=3c51f6447168549ce6a29f44cbddd6c10f1ac050;hp=6e991f0abf19c986204165859de81fe07069c48e;hpb=ea3a5fb80c7d8a582f150921b9f7247e01c5e27d;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian-org/lib/facter/paths.rb b/modules/debian-org/lib/facter/paths.rb index 6e991f0ab..a330c3013 100644 --- a/modules/debian-org/lib/facter/paths.rb +++ b/modules/debian-org/lib/facter/paths.rb @@ -1,18 +1,20 @@ -Facter.add("has_srv_build_trees") do - setcode do - if FileTest.exist?("/srv/build-trees") - true - else - '' - end - end -end -Facter.add("has_srv_buildd") do - setcode do - if FileTest.exist?("/srv/buildd") - true - else - '' + +%w{/srv/build-trees + /srv/buildd + /etc/ssh/ssh_host_ed25519_key + /srv/mirrors/debian + /srv/mirrors/debian-backports + /srv/mirrors/debian-debug + /srv/mirrors/debian-security + /dev/hwrng +}.each do |path| + Facter.add("has" + path.gsub(/[\/-]/,'_')) do + setcode do + if FileTest.exist?(path) + true + else + '' + end end end end