Hi Guys, At my company, we've been trying to get puppet to run properly for quite some time and it really looks great... except for using external recipes using parameters etc.
Let me explain the problem: We've got a an environment with a puppetmaster and some hosts, and we've created about a dozen of homebrew recipes (in order to understand how to use puppet properly)... Okay, my current recipes all have a class in /etc/puppet/modules/ <modulename>/manifests/init.pp and look like this: <code> class nagios-nrpe-server { package { "nagios-nrpe-server": ensure => present, } file { "/etc/nagios/nrpe.cfg": owner => root, group => root, mode => 644, source => "puppet:///nagios-nrpe-server/nrpe.cfg", } file { "/etc/nagios/nrpe_local.cfg": owner => root, group => root, mode => 644, source => "puppet:///nagios-nrpe-server/nrpe_local.cfg", } service { 'nagios-nrpe-server': ensure => running, enable => true, hasrestart => true, hasstatus => true, subscribe => [File['/etc/nagios/nrpe.cfg'],File['/etc/nagios/ nrpe_local.cfg']], require => Package['nagios-nrpe-server'], } } </code> Sometimes we use an ERB-style template, which is pretty cool too. Classes are applied to client-machines using this (simplified) manifests/nodes.pp file: <code> node basenode { include ntp include denyhosts include ssh include nrpe include apt include mailname include sudo include motd include be-ict-essentials include munin-node } node 'xs4all-host' inherits basenode { include resolv } node 'www.foo.nl' inherits xs4all-host { } node 'sql.foo.nl' inherits basenode { # some more modules.... } node 'www2.foo.nl' inherits xs4all-host { # some more modules.... } </code> That's fine, but I'm very interested in using the parametrised modules/ classes which everybody seems to use . I do see how they work, but I don't actually understand in what way they're being deployed to clients (ie. I do not know how include them properly in my nodes.pp and whether to create a class OR a module for those). For example, please have a look at: http://bitfieldconsulting.com/puppet-and-mysql-create-databases-and-users They're creating a mysql::server class. How should I incorporate it in the sql.foo.nl node aforementioned? We've put the class in /etc/puppet/modules/mysql/manifests/init.pp , and that's the first question I have. What should be the path? I'm actually a bit puzzled by the :: in the class name, but since it declares the server class as part of the mysql module the aforementioned path should be correct (I presume!). Agree? Okay, the next part is telling the sql.foo node to become a mysql server. I tried several constructions, all of which fail due to name resolution problems. <code> node 'sql.foo' inherits basenode { $mysql_password = "C6dDIls49ci3GEzl1vgwRUXT" include mysql::server } </code> I think it should be like this, but apparently this is incorrect. Would someone please be so kind to explain how to use that kind of recipe? Of point me to the relevant documentation about it (most is either about setting up the basic puppet, or creating very nifty recipes....but I'm currently missing the link between those). Cheers, Boudewijn Ector -- 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.