In my believe that message is from your puppetmaster unable to compile
the manifest because the hiera function is not present on the master.
If you install hiera gem, the functions are not copied to your puppet
functions dir.
I would recommend checking your gem path on the puppetmaster and
confirm the files are present.
> gem env
...
- GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
...
ls /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/*hier*
Should list: -
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_array.rb
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_include.rb
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_hash.rb
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera.rb
On my setup I was able to fix this my manually copying the file to the
puppet libdir:
# copy libs from hiera to puppet
cp /usr/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0/lib/puppet/parser/functions/*
/usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions
# restart your puppetmaster - if running behind passenger
For me restarting apache was enough
/etc/init.d/apache restart
---
Kind regards,
Martin Willemsma
2012/4/4 Andreas Paul <xor...@googlemail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/BcTVaGLa3s4J.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
--
That's correct. Per https://github.com/puppetlabs/hiera-puppet:
"For the moment the Gem install will place the Puppet Parser Function
where Puppet cannot find it, you should copy it out and distribute it
to your master using Pluginsync or something similar"
> I would recommend checking your gem path on the puppetmaster and
> confirm the files are present.
>
>> gem env
>
> ...
> - GEM PATHS:
> - /usr/lib/ruby/gems/1.8
> - /root/.gem/ruby/1.8
> ...
>
>
> ls /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/*hier*
>
> Should list: -
>
> /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_array.rb
> /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_include.rb
> /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera_hash.rb
> /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions/hiera.rb
>
> On my setup I was able to fix this my manually copying the file to the
> puppet libdir:
>
> # copy libs from hiera to puppet
> cp /usr/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0/lib/puppet/parser/functions/*
> /usr/lib/ruby/gems/1.8/gems/puppet-2.7.12/lib/puppet/parser/functions
However, I would recommend using puppet module path and puppet
pluginsync rather than copying the files to puppet's gem path. If your
module path is /etc/puppet/modules, the following command should get
the function in a location where puppet can find and compile:
ln -s /usr/lib/ruby/gems/1.8/gems/hiera-puppet-0.3.0
/etc/puppet/modules/hiera-puppet
If you want to check out the lastest version of hiera:
git clone git://github.com/puppetlabs/hiera-puppet.git
/etc/puppet/modules/hiera-puppet
HTH,
Nan
- include the gem inside the manifest
- load the correct loadpaths
- enable relocatable hiera_configdir and hiera_yaml_datasource
https://github.com/puppetlabs/hiera-puppet/pull/20
This makes it much easier to have things configured until all the hiera
is part of Telly.