configuration not applying but getting notice: Finished catalog run in 0.02 seconds

20 views
Skip to first unread message

kumar kittu

unread,
Jan 27, 2016, 5:52:20 AM1/27/16
to Puppet Users
Hi,

I am new to puppet and installed puppet standalone in my linux box.
I generated module with command:"puppet module generate test-sample" .

created  file in test-sample/manifests/site.pp:
 
class sample::site {
file { '/root/puppetfilecreation.txt':
 ensure => "present",
 owner => "root",
 group => "root",
 content => "hello Puppet had created file with module test",
}
}

and /test-sample/manifest/init.pp(this was automatically created by puppet generate )

class sample {

include sample::site (added this line)
}

When executed "puppet apply /etc/puppet/modules/test-sample/manifests/init.pp" below the response:

notice: Finished catalog run in 0.02 seconds

Issue : this puppet is not creating file which, I mentioned in site.pp

Please help me where i am getting wrong.

Thanks in advance

Hristo Mohamed

unread,
Jan 27, 2016, 6:00:59 AM1/27/16
to puppet...@googlegroups.com
created  file in test-sample/manifests/site.pp:

Rename it to sample/manifetsts.site.pp

Cheers,
Hristo

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/21331cb4-1b64-45d4-8c45-6792cc0424bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
Jan 27, 2016, 9:47:56 AM1/27/16
to Puppet Users
I see at least two distinct problems:
  1. You are structuring your code in a module (which is good), but you are naming the module directory incorrectly.  The name of the module directory should be the same as the name of the module (sample).
  2. You have some class definitions, but neither any node blocks nor any top-level class declarations.  Your class definitions describe your classes to Puppet, but you need a declaration to tell Puppet to actually apply those classes to your node.  Such a declaration would typically go in a node block that matches the target node (possibly a default block), but for standalone Puppet it is also reasonable to put such a declaration at top scope in a manifest file that you ask Puppet to evaluate.  This is why Puppet neither makes any changes nor reports any error -- you haven't given it anything to do.
Also, I'm not sure whether this is actually an issue for you, but your description seems to say that you have made your module directory a direct subdirectory of the filesystem root.  That would be a very questionable choice.  It could work if you have configured Puppet to have the filesystem root in its module path, but I strongly advise you to create a directory elsewhere to serve as the parent of all your module directories, and to put that in your module path.  Or just use Puppet's default (which depends on which Puppet version you are running and on how you run it).


John

Reply all
Reply to author
Forward
0 new messages