Jason Price
2013-Jun-11 20:33 UTC
[Puppet Users] understanding parameters and puppet-master''s nodes.pp
I''m working with the mysql module from puppetforge: https://forge.puppetlabs.com/puppetlabs/mysql I''m clearly missing something. I''m trying to work with it on a puppet master setup. I''ve used the following in nodes.pp This simple example (using the riak module) works fine: node /^qcriak.example.com/ inherits default { include riak_other class {''riak'': version => ''1.3.1'', } } This rather more complex example doesn''t work, and I''m missing something: node /^qczabbix.example.com/ inherits default { class {''mysql::server'': package_name => ''mysql55-server'', config_hash => { ''root_password'' => ''root_password'' }, } class { ''mysql::db'': title => ''zabbix'', user => ''zabbix'', password => ''zabbix_password'', host => ''localhost'', grant => [''all''], } include zabbix_users include zabbix_server } The error I''m seeing is this (on qczabbix.example.com): [root@qczabbix ~]# puppet agent -t Notice: Ignoring --listen on onetime run Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb Info: Loading facts in /var/lib/puppet/lib/facter/twc_base_facts.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class mysql::db at /etc/puppet/manifests/nodes.pp:69 on node qczabbix4b00.aws.weather.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file exists... and has the right permissions. --Jason -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ryan Coleman
2013-Jun-11 20:52 UTC
Re: [Puppet Users] understanding parameters and puppet-master''s nodes.pp
On Tue, Jun 11, 2013 at 1:33 PM, Jason Price <japrice@gmail.com> wrote:> What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file > exists... and has the right permissions. >Hi Jason, mysql::db is a defined resource type, not a class as you''ve declared it. Declare it like you would any other resource type, either in your node definition or perhaps more appropriately, within the class that needs the database. mysql::db { ''title'': key => value, } I''ve made a note that the documentation could be more clear about this. Hope this helps you get back on track. -- Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Jason Price
2013-Jun-12 00:37 UTC
Re: [Puppet Users] understanding parameters and puppet-master''s nodes.pp
THANK YOU! I was entirely missing that distinction. FWIW, here''s the ''corrected'' version of the above nodes.pp file example: node /^qczabbix.example.com/ inherits default { class {''mysql::server'': package_name => ''mysql55-server'', config_hash => { ''root_password'' => ''root_password'' }, } mysql::db { ''zabbix'': user => ''zabbix'', password => ''zabbix_password'', host => ''localhost'', grant => [''all''], } include zabbix_users include zabbix_server } --Jason On Tue, Jun 11, 2013 at 4:52 PM, Ryan Coleman <ryan@puppetlabs.com> wrote:> > On Tue, Jun 11, 2013 at 1:33 PM, Jason Price <japrice@gmail.com> wrote: >> >> What am I missing? The /etc/puppet/module/mysql/manifests/db.pp file >> exists... and has the right permissions. > > > Hi Jason, > > mysql::db is a defined resource type, not a class as you''ve declared it. > Declare it like you would any other resource type, either in your node > definition or perhaps more appropriately, within the class that needs the > database. > > mysql::db { ''title'': > key => value, > } > > I''ve made a note that the documentation could be more clear about this. Hope > this helps you get back on track. > > -- > Ryan Coleman | Modules & Forge | @ryanycoleman | ryancoleman in #puppet > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.