suppress notice for file resource recursive

89 views
Skip to first unread message

Constantin Wolber

unread,
Sep 4, 2014, 4:19:02 PM9/4/14
to puppet...@googlegroups.com
Hi,

i searched quite a bit in the documentations and through google but did not find a suitable solution.

I am using the file resource to change the ownership of a directory recursively. What happens is that for every single file a notice is generated for change of user and of group. Since I'm using some reports on the puppetmaster this puts a lot of uninteresting information in those reports. So is there any chance of suppressing those notices?

I only found a solution for a manual run but not for an automatic run. Since the --logdest would also suppress notices that are interesting in other situations. 

Regards

Constantin

Nan Liu

unread,
Sep 4, 2014, 4:36:04 PM9/4/14
to puppet...@googlegroups.com
You can drop the resource loglevel to debug,

file { '/tmp/a':
  ensure => directory,
  recurse => true,
  loglevel => 'debug',
}

This will suppress the change message unless you run puppet agent with the flag --debug, but you should still see the refresh notice if something changes.

HTH,

Nan

Constantin Wolber

unread,
Sep 5, 2014, 4:46:02 AM9/5/14
to puppet...@googlegroups.com
Hi,

thx  a lot for the answer. I was experimenting with the loglevel already but misunderstood the concept :)

So everything works now as expected. 

Once again thx alot

Constantin
Reply all
Reply to author
Forward
0 new messages