(inline) On Wed, Feb 05, 2014 at 05:51:37AM -0800, Sudheendra S.N wrote: > Even i am observing same problem. Puppet Version : 2.7.25 > I just tried to create a file in /tmp folder, but after executing puppet > agent --test --server <server> --debug, i could not see any file created > in /tmp. > Attaching the debug text. > Below is my class/module: > class hosts { > file { "tmp/hosts" > owner => root, > group => root, > mode => 755, > }
That is "tmp/hosts" not "/tmp/hosts" so puppet will look for a subdirectory of its working directory called tmp, probably not find it, and not create the file. Besides which you need a colon in there: file { '/tmp/hosts': owner => root, group => root, mode => 0755, } > In nodes.pp: > node default { > include hosts, > include my_class, > } No commas as the end of the line in a node declaration, that's purely to keep parameters apart in a resource. So: node default { include hosts include my_class } I personally keep this bookmarked: http://docs.puppetlabs.com/puppet/3/reference/index.html And running this over your manifests may help: http://puppet-lint.com/ > node <agent> inherits default { > } > Please help me on solving this. > Thanks for help, > Sudheendra. > On Saturday, March 5, 2011 11:26:26 PM UTC+5:30, Matt wrote: > > I think there is some confusion, where is the ntp manifest located? Is > it in its own module or the site manifest directory. If its the latter, > then you need to import that manifest into the site manifest. If its a > module, then you still need to do the import for the module. > Try updating your site manifest with an import of ntp. > So your site manifest should be > import "nodes" > import "ntp" > > On Fri, Mar 4, 2011 at 2:19 PM, mark bradley <[1]gopea...@gmail.com> > wrote: > > Hi, > > My site.pp: > [root@S manifests]# cat /etc/puppet/manifests/site.pp > import "nodes.pp" > [root@S manifests]# > > I copied ntp.pp into init.pp as you've suggested: > [root@S manifests]# cp ntp.pp init.pp > [root@S manifests]# diff ntp.pp init.pp > [root@S manifests]# > I started the server as follows: > > [root@S training]# puppet master --debug > > The results of running the command normally: > [root@S ~]# puppet agent --test --server=[2]S.domain.com > info: Caching catalog for [3]S.domain.com > info: Applying configuration version '1299265059' > notice: Finished catalog run in 0.07 seconds > [root@S ~]# > with the (master) output in the log file as: > Mar 4 14:07:50 S puppet-master[5716]: Expiring the node cache of > [4]S.domain.com > Mar 4 14:07:50 S puppet-master[5716]: Not using expired node for > [5]S.domain.com from cache; expired at Fri Mar 04 14:06:50 -0500 2011 > Mar 4 14:07:50 S puppet-master[5716]: Caching node for > [6]S.domain.com > Mar 4 14:07:51 S puppet-master[5716]: Compiled catalog for > [7]S.domain.com in environment production in 0.24 seconds > Mar 4 14:07:51 S puppet-agent[7169]: Caching catalog for > [8]S.domain.com > Mar 4 14:07:51 S puppet-agent[7169]: Applying configuration version > '1299265059' > Mar 4 14:07:51 S puppet-agent[7169]: Finished catalog run in 0.07 > seconds > The output from your suggested command (with -d -v) provided as an > attachment. > > root@S manifests]# puppet agent --test --server=[9]S.domain.com -d -v > >/tmp/bar.txt > [root@S manifests]# wc -l /tmp/bar.txt > 214 /tmp/bar.txt > [root@S manifests]# > Thanks very much for any help, > Mark > > On Sat, Feb 26, 2011 at 10:15 PM, [10]yzh...@gmail.com > <[11]yzh...@gmail.com> wrote: > > 1、site.pp: import "nodes.pp" > > 2、ntp.pp====should be $module_path/manifests/init.pp > > 3、puppet agent --test --server=S -d -v > > > > Have a look > > > at > [12]http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Best_Practice > > > > On Sun, Feb 27, 2011 at 8:01 AM, mark bradley > <[13]gopea...@gmail.com> wrote: > >> > >> Hi, > >> > >> I've just installed Puppet on two CentOS 5.5 servers, "S" for "A". > "A" > >> does not have the ntp package installed nor of course ntp running. > >> > >> The Puppet server is started on "S" with the ntp class from this > >> tutorial: [14]http://bitfieldconsulting.com/puppet-tutorial > (included > >> below) however when I run the agent on "A" it don't produce a > notice > >> that a change needs to be applied: > >> > >> root@A ~]# puppet agent --test --server=S > >> info: Caching catalog for [15]A.domain.com > >> info: Applying configuration version '1298756440' > >> notice: Finished catalog run in 0.07 seconds > >> [root@A ~]# > >> > >> Apparently it should not notifying me that ntp needs to be > installed > >> and started. > >> > >> ntp.pp on S: > >> class ntp { > >> package { "ntp": > >> ensure => installed > >> } > >> service { "ntp": > >> ensure => running > >> } > >> } > >> > >> nodes.pp on S: > >> node A { > >> include ntp > >> } > >> > >> Did I miss some crucial set in the installation or configuration? I > >> know it's seeing the files since if I introduce syntax errors into > >> them Puppet complains. > >> > >> Thanks for any help, > >> Mark > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Puppet Users" group. > >> To post to this group, send email to > [16]puppet...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> [17]puppet-users...@googlegroups.com. > >> For more options, visit this group at > >> [18]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 [19]puppet...@googlegroups.com. > > To unsubscribe from this group, send email to > > [20]puppet-users...@googlegroups.com. > > For more options, visit this group at > > [21]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 [22]puppet...@googlegroups.com. > To unsubscribe from this group, send email to > [23]puppet-users...@googlegroups.com. > For more options, visit this group at > [24]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 unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > > [25]https://groups.google.com/d/msgid/puppet-users/3ae23036-0858-4a60-b017-834a964b9040%40googlegroups.com. > For more options, visit [26]https://groups.google.com/groups/opt_out. > > References > > Visible links > 1. javascript: > 2. http://s.domain.com/ > 3. http://s.domain.com/ > 4. http://s.domain.com/ > 5. http://s.domain.com/ > 6. http://s.domain.com/ > 7. http://s.domain.com/ > 8. http://s.domain.com/ > 9. http://s.domain.com/ > 10. javascript: > 11. javascript: > 12. http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Best_Practice > 13. javascript: > 14. http://bitfieldconsulting.com/puppet-tutorial > 15. http://a.domain.com/ > 16. javascript: > 17. javascript: > 18. http://groups.google.com/group/puppet-users?hl=en > 19. javascript: > 20. javascript: > 21. http://groups.google.com/group/puppet-users?hl=en > 22. javascript: > 23. javascript: > 24. http://groups.google.com/group/puppet-users?hl=en > 25. > https://groups.google.com/d/msgid/puppet-users/3ae23036-0858-4a60-b017-834a964b9040%40googlegroups.com > 26. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140205192803.GA3935%40iniquitous.heresiarch.ca. For more options, visit https://groups.google.com/groups/opt_out.