How to create / update resources at puppetmaster without restarting puppetmaster

91 views
Skip to first unread message

Waqar Aziz

unread,
Feb 2, 2012, 2:41:27 AM2/2/12
to Puppet Users
Guys,

I am trying to add new resources to puppetmaster i am following steps
below

1. Creating a testclass.pp in "manifests/services" directory
2. Trying to apply newly created class to the node using ruby script
ie testmanifest.rb


As a result of above steps i am getting error below

"err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Cannot find definition Class on node"

Please help how may i create new resources and use them without
restarting

Denmat

unread,
Feb 2, 2012, 3:55:07 AM2/2/12
to puppet...@googlegroups.com
Hi,

You will need to provide more detail as to what you are doing. We have no idea what the following does:
testclass.pp 
or
testmanifest.rb

Loosely speaking puppet will rescan files in /etc/puppet without the need to restart the master (depending on your version of puppet).

Cheers
Den
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

jcbollinger

unread,
Feb 2, 2012, 9:24:45 AM2/2/12
to Puppet Users


On Feb 2, 2:55 am, Denmat <tu2bg...@gmail.com> wrote:
> Hi,
>
> You will need to provide more detail as to what you are doing. We have no idea what the following does:
>
> > testclass.pp
> or
> > testmanifest.rb
>
> Loosely speaking puppet will rescan files in /etc/puppet without the need to restart the master (depending on your version of puppet).


Yes, but also Puppet will not autoload manifest files from manifests/
services/, and I think not even from manifests/. If you put your
manifests in those places then you need to 'import' them for Puppet to
be able to see their contents. It would be far better, however, to
put substantially all manifests into modules, following the standard
module layout, so that the autoloader can find them.

That could look like this:

1) testclass.pp goes in modules/test/manifests/
2) an empty init.pp also goes in modules/test/manifests/
3) testclass.pp contains a single class named 'test::testclass'

Node definitions would then assign that class by

include 'test::testclass'

or possibly

class { 'test::testclass': }


John
Reply all
Reply to author
Forward
0 new messages