Op 28/11/2011 18:21, Phillip Frost schreef:
On Nov 28, 2011, at 9:45 AM, Boudewijn Ector wrote:
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?
Here's a start:
http://docs.puppetlabs.com/guides/modules.html
http://docs.puppetlabs.com/guides/parameterized_classes.html
That's indeed a goot start, thank you very much.
But I'm still not being able to get it to work. I've changed:
- put the mysql::server module in
/etc/puppet/modules/mysql/manifests/server.pp
- in nodes.pp:
node 'sql.foo' inherits basenode
{
$mysql_password = "C6dDIls49ci3GEzl1vgwRUXT"
include mysql::server
}
This works fine, except for the $mysql_password not being passed
properly to the class.
Therefore I've tried to parametrize the class, and I think I should be
using this syntax (according to the table in
http://docs.puppetlabs.com/guides/modules.html)
foo::params { "example": value => 'meow' }
So....
node 'sql.foo' inherits basenode
{
mysql::server { "mysql_password":value =>
'C6dDIls49ci3GEzl1vgwRUXT' }
}
And more importantly, I've changed the heading of the server class to:
class mysql::server ($mysql_password) {
This still isn't working, I'm getting erorrs such as:
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
resource type mysql::server at /etc/puppet/manifests/nodes.pp:21 on node
sql.foo
When I also add the include keyword I get:
debug: catalog supports formats: b64_zlib_yaml dot marshal pson raw
yaml; using pson
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not parse for environment production: Syntax error at '{';
expected '}' at /etc/puppet/manifests/nodes.pp:21 on node
lsp-vp-db1.boudewijnector.nl
Can you please tell me where I'm messing up despite reading the
documentation?
Cheers,
Boudewijn
--
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.