-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I've just seen that the scambled Quotations are not a problem of my
Mailclient - so I put it here again better formatted...
I would be really happy if anyone had a clue.
Regards
Mario
Am 28.06.2013 18:08, schrieb Mario van der Linde:
[...]
> This is my class:
>> 1 class test { 2 $var1 = 'foo' 3 $var2 = 'bar' 4 $vars =
>> ["var1","var2"] 5 notice($var1) 6 notice($var2) 7
>> notice($vars) 8 each($vars) |$var| { 9 $vardata =
>> inline_template("<%= scope.lookupvar(var) %>") 10
>> notice("$var: $vardata") 11 } 12 }
>
> If I run this like this puppet apply --parser future
> --modulepath=/root/puppet/modules --environment=production
> --loadclasses --noop --verbose puppet/site.pp
>
> I get the following outpu with deprecation warning:
>> Notice: Scope(Class[Test]): foo Notice: Scope(Class[Test]): bar
>> Notice: Scope(Class[Test]): var1 var2 Warning: Variable access
>> via 'var' is deprecated. Use '@var' instead. template[inline]:1
>> (at (erb):1:in `result') Notice: Scope(Class[Test]): var1: foo
>> Notice: Scope(Class[Test]): var2: bar
>
> Ok, if I change line 9 to
>> 9 $vardata = inline_template("<%= scope.lookupvar(@var) %>")
>
> I get this Error:
>> Notice: Scope(Class[Test]): foo Notice: Scope(Class[Test]): bar
>> Notice: Scope(Class[Test]): var1 var2 Error: Failed to parse
>> inline template: Scope variable name is a NilClass, not a string
>> at /root/test.pp:14 on node hackweek.office.b1-systems.de Error:
>> Failed to parse inline template: Scope variable name is a
>> NilClass, not a string at /root/test.pp:14 on node
>> hackweek.office.b1-systems.de
>
> Can anyone tell me what I'm doing wrong here?
- --
Mario van der Linde
Linux Consultant & Trainer
Tel.: +49-151-16879485
Mail: [email protected]
B1 Systems GmbH
Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de
GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlHRKq0ACgkQ0xt2iESAuwRc7ACeKIHZWU4FE91O3Hukc/a6uQkI
FwAAn3u1mxbb/eFcwZBgmaPWi49ANlVs
=kmZf
-----END PGP SIGNATURE-----
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.