X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fdebian-org%2Flib%2Ffacter%2Fpaths.rb;h=a330c30136f41533c4e0cd9e373e834ea1715685;hb=e124727e06201fda70561b0f687d28950425c599;hp=507d1df36cd797398cdc61c3923de5813a08bfc3;hpb=88e5880d385c49cfdc35276f44c110c4fb45952b;p=mirror%2Fdsa-puppet.git diff --git a/modules/debian-org/lib/facter/paths.rb b/modules/debian-org/lib/facter/paths.rb index 507d1df36..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