On 11/28/2011 05:07 PM, Boudewijn Ector ICT wrote:
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
mysql::server { "mysql_password":value =>
'C6dDIls49ci3GEzl1vgwRUXT' }
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
What you are asking puppet to do is create a "mysql::server" with the
name "mysql_password", passing it a parameter called "value" with the
value "C6dD...". Probably not what you intended. You would use this
syntax if you had defined a resource, with something starting with
"define mysql::server" in server.pp.
However, I assume mysql::server is a class, ie server.pp begins with
"class mysql::server". So, the type of the resource is "class", and the
name is "mysql::server". To declare it (ie, to say that your node is one
of this class), you would put this in your node:
class { "mysql::server":
mysql_password => "...",
other_parameter => "other_value",
[etc...]
}
This is detailed here:
http://docs.puppetlabs.com/guides/parameterized_classes.html#declaring-a-parameterized-class
--
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.