Matt,

There is no realhostname variable in scope when the template is getting
called.

Variables in templates either need to be facts or set in the scope of Puppet
they are being called from.

Does that make sense?

Andrew


On Tue, Jan 27, 2009 at 5:22 PM, Matt McLeod <m...@boggle.org> wrote:

>
> I'm following the example provided in the type reference
> under 'zone', i.e.:
>
>        zone{myzone:
>                autoboot=>true,
>                create_args=>"-b",
>                ip=>"nge0:10:130.55.201",
>                path=>"/zoneds/%s",
>                realhostname=>"myzone.example.com",
>                sysidcfg=>template(sysidcfg)
>        }
>
> with the following template:
>
> system_locale=en_AU
> timezone=Australia/NSW
> terminal=xterms
> security_policy=NONE
> root_password=elided
> timeserver=localhost
> name_service=DNS {domain_name=<%= domain %>
>        name_server=10.132.2.150}
> network_interface=primary {hostname=<%= realhostname %>
>        ip_address=<%= ip %>
>        netmask=<%= netmask %>
>        protocol_ipv6=no
>        default_route=<%= defaultroute %>}
> nfs4_domain=dynamic
>
> The sysidcfg template is ripped straight from
> <http://reductivelabs.com/trac/puppet/wiki/TypeReference#zone>
> but it doesn't work:
>
> err: Could not retrieve catalog: Failed to parse template sysidcfg: Could
> not find value for 'realhostname' at
> /staging/puppet/production/manifests/nodes.pp:90 on node
> elided.example.com
>
> This is with Puppet 0.24.7 on both client and server.
>
> I've not really needed the templating before so it's possible that
> there's a really obvious error in the template provided in the
> type reference and I'm just not seeing it.
>
> Matt
>
> --
> * Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
>     --- People can do the work, so machines have time to think ---
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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