Felix Frank
unread,Dec 4, 2013, 10:10:03 AM12/4/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
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?
>