jkotran
2009-May-20 04:03 UTC
[Puppet Users] Struggling to understand classes, nodes, and case statements
I am struggling with a multiple operating system Puppet setup. My
Ubuntu client complains that "Configuration could not be instantiated"
and the warning message references a module that is for OpenSolaris
clients only (blastwave).
Please help me if you can. I have been spinning my wheels for hours.
/etc/puppet/manifests/site.pp:
import "nodes"
import "templates"
/etc/puppet/manifests/templates.pp:
node basenode {
case $operatingsystem {
"Debian": { include baseapps }
"Solaris": {
include automount, blastwave, ips, syslog,
timeslider
}
}
}
node default inherits basenode {}
/etc/puppet/manifests/nodes.pp:
node foo inherits basenode {
include named::server, ntp::server
}
node bar inherits basenode {}
U B U N T U C L I E N T :
root@bar:~# puppetd --no-daemonize --server puppetmaster --verbose --
waitforcert 60
notice: Starting Puppet client version 0.24.5
info: Retrieving plugins
err: /File[/var/lib/puppet/lib]: Failed to retrieve current state of
resource: No specified source was found from puppet://puppetmaster/plugins
warning: Configuration could not be instantiated: Could not find
dependency File[blastwave-install] for Exec[pkgutil -y -i `grep -v ^# /
var/opt/csw/pkgutil/blastwave-install`] at /etc//opt/csw/puppet/
modules/blastwave/manifests/init.pp:36; using cached catalog
notice: Starting catalog run
notice: Finished catalog run in 0.06 seconds
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
jkotran
2009-May-20 16:49 UTC
[Puppet Users] RESOLVED Re: Struggling to understand classes, nodes, and case statements
I think that the problem is that I have another case $operatingsystem in the baseapps class that my basenode includes. I don''t fully understand why, but it seems to me that you can only use a variable once. Regards, Joe Kotran On May 20, 12:03 am, jkotran <jkot...@yahoo.com> wrote:> I am struggling with a multiple operating system Puppet setup. My > Ubuntu client complains that "Configuration could not be instantiated" > and the warning message references a module that is for OpenSolaris > clients only (blastwave). > > ...--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
James Turnbull
2009-May-20 22:20 UTC
[Puppet Users] Re: RESOLVED Re: Struggling to understand classes, nodes, and case statements
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 jkotran wrote:> I think that the problem is that I have another case $operatingsystem > in the baseapps class that my basenode includes. I don''t fully > understand why, but it seems to me that you can only use a variable > once. >That shouldn''t be the case. Can you show us your full manifest? It''s hard to trouble-shoot if we only see part of the manifest. Thanks James Turnbull - -- Author of: * Pro Linux Systems Administration (http://www.amazon.com/gp/product/1430219122/) * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKFII29hTGvAxC30ARAutVAKDYlJsmggYUTBPmSn5zq2d/bIqVDQCffAYC PkpJUJvvg8OfaWsVT/5peA8=LuQx -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
jkotran
2009-May-21 14:49 UTC
[Puppet Users] Re: Struggling to understand classes, nodes, and case statements
James, You are correct. I misunderstood the problem I encountered. Funny enough my manifests are following your book almost verbatim. :-) My setup start working with a "case $operatingsystem" in templates.pp and modules/sshd/manifests/init.pp. Out of desperation I restarted the server process. Does the server require a restart to affect changes to /etc/puppet/manifests/templates.pp? If that isn''t it, I don''t know what fixed my problem, but I am okay now. Regards, Joe Kotran On May 20, 6:20 pm, James Turnbull <ja...@lovedthanlost.net> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > jkotran wrote: > > I think that the problem is that I have another case $operatingsystem > > in the baseapps class that my basenode includes. I don''t fully > > understand why, but it seems to me that you can only use a variable > > once. > > That shouldn''t be the case. Can you show us your full manifest? It''s > hard to trouble-shoot if we only see part of the manifest. > > Thanks > > James Turnbull > > - -- > Author of: > * Pro Linux Systems Administration > (http://www.amazon.com/gp/product/1430219122/) > * Pulling Strings with Puppet > (http://www.amazon.com/gp/product/1590599780/) > * Pro Nagios 2.0 > (http://www.amazon.com/gp/product/1590596099/) > * Hardening Linux > (http://www.amazon.com/gp/product/1590594444/) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iD8DBQFKFII29hTGvAxC30ARAutVAKDYlJsmggYUTBPmSn5zq2d/bIqVDQCffAYC > PkpJUJvvg8OfaWsVT/5peA8> =LuQx > -----END PGP SIGNATURE-------~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---