Try:

inline_template('<%= scope.lookupvar("::fqdn") %>')

ken.

On Sun, Jun 12, 2011 at 3:20 PM, Matthias Saou
<th...@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net>
wrote:
> Hi,
>
> I'm starting to play with the latest puppet 2.7.0rc4, one of my goals
> being to try and update all of my puppet related files to be compatible
> with it, with no warnings at all.
>
> I've read in detail this page :
> http://docs.puppetlabs.com/guides/scope_and_puppet.html
>
> There is no mention of anything special to do for global scope
> variables inside templates, such as :
>
> file { '/tmp/test': content => inline_template ('<%= fqdn %>') }
>
> Yet when using <%= ::fqdn %> I get the following :
>
> (err): compile error
> (erb):1: syntax error, unexpected tIDENTIFIER, expecting tCONSTANT
> _erbout = ''; _erbout.concat(( ::fqdn ).to_s); _erbout
>
> How should these global scope variables (facts in this case) be used
> inside erb templates? Maybe there's some obvious ruby syntax I'm
> missing?
>
> Matthias
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to