jms1

facter bug?

Aug 24th, 2016
317
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (root@deimos) 66 ~ # find /etc/puppetlabs/ /opt/puppetlabs/ -name vgp\*
  2. /opt/puppetlabs/puppet/cache/lib/facter/vgp_needs_restart.rb
  3. (root@deimos) 67 ~ # cat /opt/puppetlabs/puppet/cache/lib/facter/vgp_needs_restart.rb
  4. # Tell Puppet whether this file already exists on the client.
  5.  
  6. Facter.add("vgp_needs_restart") do
  7.   setcode do
  8.     File.exist?("/etc/voalte/restart_vgp.flag")
  9.   end
  10. end
  11.  
  12. (root@deimos) 68 ~ # facter -p vgp_needs_restart
  13. false
  14. (root@deimos) 69 ~ # facter -jp vgp_needs_restart
  15. {
  16.   "vgp_needs_restart": true
  17. }
  18. (root@deimos) 70 ~ # facter --version
  19. 3.2.0 (commit 148948d795fbdcf6bcf51ed36a73f496775835dc)
RAW Paste Data