FAQ
Hi guys,

I'm working on puppet for windows, and now I have to work on a template
that use the value from a variable set it on a class, the problem that i
got is always I got undef value on the result file.
I checked this URL without no results
http://stackoverflow.com/questions/10589404/puppet-cant-find-variable-for-template

These are my classes variables:

class direct::config () {

require direct::setup

$nameSite = 'some.site.com'
..
}

and this where I use it on my template locate on
direct/templates/conf/css.erb:
.
DomainIP <%= @ipaddress %>,127.0.0.1
DefServerName <%= scope.lookupvar("direct::config::nameSite") %>
.
.


And the file results css.cfg:
.
DomainIP 10.10.10.23,127.0.0.1
DefServerName undefined
.
.

I expected DefServerName some.site.com

Could you help me with this issue? What Am I doing wrong?

Thank you in advance...

Best Regards.

--
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/-/-2FK6mx9ESQJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Jakov Sosic at Dec 13, 2012 at 5:28 pm

    On 10/29/2012 09:11 PM, mparrad wrote:
    Hi guys,

    I'm working on puppet for windows, and now I have to work on a template
    that use the value from a variable set it on a class, the problem that i
    got is always I got undef value on the result file.
    I checked this URL without no results
    http://stackoverflow.com/questions/10589404/puppet-cant-find-variable-for-template

    These are my classes variables:

    class direct::config () {

    require direct::setup

    $nameSite = 'some.site.com'
    ..
    }

    and this where I use it on my template locate on
    direct/templates/conf/css.erb:
    .
    DomainIP <%= @ipaddress %>,127.0.0.1
    DefServerName <%= scope.lookupvar("direct::config::nameSite") %>
    .
    .


    And the file results css.cfg:
    .
    DomainIP 10.10.10.23,127.0.0.1
    DefServerName undefined
    .
    .

    I expected DefServerName some.site.com

    Could you help me with this issue? What Am I doing wrong?
    Do you have direct::config included in your host manifest anywhere? Also
    could you paste part of the code (including the wrapper class) that
    defines file which uses template css.erb?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 29, '12 at 8:11p
activeDec 13, '12 at 5:28p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Mparrad: 1 post Jakov Sosic: 1 post

People

Translate

site design / logo © 2022 Grokbase