From: Peter Palfrader Date: Sat, 14 Feb 2015 21:38:35 +0000 (+0100) Subject: buildd user exists facter X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a8f10fd2b77f5cc0f29ce1adb047788d25393f19;p=mirror%2Fdsa-puppet.git buildd user exists facter --- diff --git a/modules/debian-org/lib/facter/roleaccounts.rb b/modules/debian-org/lib/facter/roleaccounts.rb index bb652f8cd..c2c778b6c 100644 --- a/modules/debian-org/lib/facter/roleaccounts.rb +++ b/modules/debian-org/lib/facter/roleaccounts.rb @@ -50,6 +50,7 @@ begin end end + Facter.add("buildd_key") do setcode do key = nil @@ -61,6 +62,19 @@ begin end end + Facter.add("buildd_user_exists") do + setcode do + result = '' + begin + if Etc.getpwnam('buildd') + result = true + end + rescue ArgumentError + end + result + end + end + rescue Exception => e end