On Apr 25, 2008, at 10:05 AM, Ashley Penney wrote:
> Hi,
>
> I modified the puppet.schema so I could define variables like ip,
> netmask, network, gateway etc directly in the node definition.
>
> Then I have puppetclass: baseclass, and in here I call a network
> define that''s in a module called network/. This calling works,
but
> I can''t seem to pass the information that SHOULD be in variables
> from LDAP. I have this:
>
> class baseclass {
> include network
> network::ip { "eth0": ip => "$ip", netmask =>
"$netmask",
> gateway => "$gateway", network => "$network",
broadcast =>
> "$broadcast", gateway => "$gateway", hostname =>
"$cn", enabled =>
> "yes" }
> }
>
> Is this a namespace problem where the variables are only valid under
> the node definition? My other idea was to define a basenode in the
> nodes.pp file that includes this define, in case the variables work
> there, because I
> don''t have anywhere to extend the node configuration now that
I''m
> using LDAP nodes.
Variables defined in your external nodes app are available throughout
your configuration, just like facts.
You can more easily test whether these are available in a simple
''notice'' function call:
notice "Netmask is ''$netmask''"
This will print a log message on the server.
Note that the support for variables in ldap has not always been
present, so you''ll need to be using a relatively recent version for
this to work (some time in 0.24, maybe?).
--
Don''t throw away the old bucket until you know whether the new one
holds water. -- Swedish Proverb
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---