Search code examples
puppethiera

How do I check what version of Hiera is installed on Puppet?


I tried looking this up in facter, but I couldn't find it there.


Solution

  • If you want to find out the version of Hiera and make it a fact you can use within a manifest, you can do something like this:

    Facter.add(:hiera_version) do
      setcode do
        require 'hiera/version'
        Hiera.version.to_s
      end
    end