Works for me.

$ cat /tmp/test.pp
$config = {
    host1 => {
       port => 1111,
       msg  => 'dfdasfas'
    },
    host2 => {
       port => 2222,
       msg  => 'dfdasfas'
    },
  }

notify { 'test':
  message => inline_template("keys: <%= @config.keys %>")
}

$ puppet --version
2.7.21
$ puppet apply /tmp/test.pp
notice: keys: host1host2
notice: /Stage[main]//Notify[test]/message: defined 'message' as 'keys:
host1host2'
notice: Finished catalog run in 0.01 seconds

Something's odd.

Cheers,
Felix

On 12/04/2013 02:32 PM, David Portabella wrote:
> $ puppet apply --templatedir=templates/ test.pp 
> 
> this works on puppet 3.2, but it fails on puppet 2.7 with:
> Unknown function keys at /home/vagrant/test.pp:12
> 
> why?
> 
> I guess that this depends on the version of ruby used for handling
> templates. why ruby version does puppet 2.7 and puppet 3 use?
> 
> what is a workaround to make this work on puppet 2.7?
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/529F45CB.4090602%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to