I'm trying to understand the sequence of passing variables from a node
definition to a define statement and how its called by a class. In short my
understanding is that nodes.pp can contain variables (eg. zoneip=>a.b.c.d, )
which are referenced by a define statement ( eg. define zones::zone_instance
(zoneip=$zoneip) and the class statement calls the definition (class zones
{zones::zone_instance etc)
More specifically, I'm defining a solaris zone, following a combination of
some tips in a previous posting and the apache virtual_hosts example in
"Pulling Strings" and for some reason my definition statement is not being
recognised * "Could not find resource type zones::zone_instance*"
Here's the set up:-
*
The node def in nodes.pp:-*
* node 'solhost' {
include zones
zone_instance { "solzone":
zoneip => "10.20.1.89",
zonename => "ptc37551-03",
zonepath => "/zfs/ptc37551-03",
}
}*
within the zones modules directory:-
*modules/zones/manifests/init.pp*:-
*class zones {
zones::zone_instance { $zonename:
zoneip => "$zoneip",
zonename => "$zonename",
zonepath => "$zonepath",
}
}*
and the corresponding definition in
*modules/zones/manifests/ptczones.pp*:-
*define zones::zone_instance (zoneip=$zoneip,$zonename,$zonepath) {
$fullname = "$zonename.$domain"
zone { $zonename:
ip => "bnx0:$zoneip",
path => "$zonepath",
realhostname => "$fullname",
ensure => running,
}
}*
Running on the puppet client I get the following error
puppetd --test
*err: Could not retrieve catalog: Could not find resource type
zones::zone_instance at /etc/puppet/modules/zones/manifests/init.pp:7 on
node solhost
*
Any pointers would be great*
*
Thanks
Paul
--
Paul Matthews
----------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---