Ask Your Question

How to use the File type resource to leverage ignoring a hidden directory

asked 2013-12-12 14:45:17 -0600

bmurts gravatar image

Currently we have an NFS mount that our StatsD/Graphite data is written to. This NFS volume has SnapShots enabled and therefore a .snapshot folder exists. The .snapshot director is owned by root:root. Currently, all other files and folders in that same level need to be set to www-data:www-data.

The problem I'm running into is that when I'm attempting to use the File type resource and include the ignore parameter, it does not appear to be working properly. I've also tried to escape the '.' without any success.

I also looked at the Puppet source code ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-12-12 15:35:26 -0600

ramindk gravatar image

updated 2014-03-05 22:38:38 -0600

I tested with 2.7 and 3.2 on Ruby 1.8.7, 1.9.3, and 2.0.0. Works fine in my tests.

However I noticed that your code says this:

file { '/opt/graphite/storage':
  owner   => $::graphite::params::web_user,
  group   => $::graphite::params::web_user,
  ignore  => '.snapshot',
  recurse => true,
  require => Anchor['graphite::install::end'],

while your logs mention a path that stats with /data rather than /opt in the code above.

notice: /File[/data/opt/graphite/storage/.snapshot]/owner: current_value root, should be www-data (noop)

Is it possible that a different resource is causing the problem?

After chatting on IRC ... (more)

edit flag offensive delete link more


"Is it possible that a different resource is causing the problem? ...After chatting on IRC I think your problem was that you were managing different parts of the path in ...(more)

bmurts gravatar imagebmurts ( 2013-12-12 16:29:47 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-12-12 14:45:17 -0600

Seen: 1,005 times

Last updated: Mar 05 '14