I followed your steps. now i am getting below error
Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class
dev_jboss_jeeva for vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod
Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]: Could not find class
dev_jboss_jeeva for vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod
Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]:
(//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog from remote
server: Error 400 on SERVER: Could not find class dev_jboss_jeeva for
vm-jeeva2.aircell.prod at /etc/puppet/manifests/nodes/jeeva_base.pp:2 on
node vm-jeeva2.aircell.prod
Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]:
(//vm-jeeva2.aircell.prod/Puppet) Using cached catalog
Apr 13 17:42:44 pil-vm-pup-01 puppet-master[7899]:
(//vm-jeeva2.aircell.prod/Puppet) Could not retrieve catalog; skipping run
Apr 13 17:43:44 pil-vm-pup-01 puppet-master[7899]: Could not find class
dev_jboss_jeeva for vm-jeeva2.aircell.prod at
/etc/puppet/manifests/nodes/jeeva_base.pp:2 on node vm-jeeva2.aircell.prod
i have jeeva_base.pp file under /etc/puppet/manifests/nodes and below is
its content
--------------------------------
node jeeva_base {
include dev_jboss_jeeva
}
--------------------------------------
also i have a another .pp file by name vm-jeeva2 under
/etc/puppet/manifests/nodes and below is its content. we have seperate .pp
file for each server name. one server is vm-jeeva2.
------------------
node vm-jeeva2 inherits jeeva_base {
}
--------------------
what could be the problem ?
On Thu, Apr 12, 2012 at 2:47 PM, Sans <[email protected]> wrote:
> You probably getting: "file not found" or something like that? It's
> because you are trying to copy a file from one machine (i.e. puppet
> server) to another machine, your puppet agent, using "cp" command.
> Puppet has file{} resource and "source" parameter for that. Other than
> that, if not typo, I don't see any gap between the source_path and the
> dest_path in your "cp" command.
>
> Also, I think "class d_services::jboss" is wrong in your case. You
> don't have any "d_services" module, I suppose. Try this: If "jmx-
> console-users.properties" is the file that your are trying to copy,
> then create a directory on your Puppet-master at "etc/puppet/modules/
> dev_jboss_jeeva/files" and put the configuration file(s) in there
> first. Then, use this:
>
>
>
> # /etc/puppet/modules/dev_jboss_jeeva/manifests/jboss.pp
> --------------------------------------------------------
>
> class dev_jboss_jeeva::jboss {
>
> define opt_dir($path) {
>
> $j_conf = 'jmx-console-users.properties'
>
> exec { "chk_${path}":
> path => [ '/bin', '/usr/bin' ],
> command => "test -d /opt/${path}",
> }
>
> file { "${path}_${j_conf}":
> name => "/opt/${path}/${j_conf}",
> mode => '0644', owner => 'root', group => 'root',
> source => "puppet:///modules/dev_jboss_jeeva/${j_conf}",
> require => Exec[ "chk_${path}" ];
> }
> }
> }
>
>
> Now, suppose you are copying the file: jmx-console-users.properties to
> "/opt/jboss_1", "/opt/jboss_2" and "/opt/jboss_3" on the agent (if
> available), change the init.pp like this:
>
>
>
> # /etc/puppet/modules/dev_jboss_jeeva/manifests/init.pp
> --------------------------------------------------------
> class copy_jboss_conf {
>
> include dev_jboss_jeeva::jboss
> dev_jboss_jeeva::jboss::opt_dir {
>
> 'copy_to_1st':
> path => 'jboss_1';
>
> 'copy_to_2nd':
> path => 'jboss_2';
>
> 'copy_to_3rd':
> path => 'jboss_3';
> }
> }
> ******************************************************
>
>
> Not tested, but should work. At least it's working for me in similar
> fashion. Cheers!!
>
>
>
> On Apr 12, 6:40 pm, Munna S <[email protected]> wrote:
> > Hi Sans,
> >
> > This is my jboss.pp file
> >
> > class d_services::jboss {
> > define opt_dir($path) {
> > exec { "copy_${path}":
> > path => [ '/bin', '/usr/bin' ],
> > command => "cp /etc/puppet/modules/dev_jboss_jeeva/opt/jboss/
> >
> jboss-4.2.3.GA/server/default/conf/props/jmx-console-users.properties/opt/${path}
> ",
> > onlyif => "test -d /opt/${path}",
> > }
> > }
> >
> > }
> >
> > this is my init.pp file
> >
> > class dev_jboss_jeeva {
> > include d_services::jboss
> > d_services::jboss::opt_dir {
> > 'jboss_1':
> > path => '/opt/jboss/jboss-4.2.3.GA/server/default/conf/props/';
> > }
> >
> > }
> >
> > But i am still getting the error
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.