Ask Your Question

what does the ignore parameter mearn of the file resource?

asked 2014-10-16 20:36:16 -0600

alameow gravatar image

i see in file resource, there is a ignore parameter. it says:

A parameter which omits action on files matching specified patterns during recursion. Uses Ruby’s builtin globbing engine, so shell metacharacters are fully supported, e.g. [a-z]. Matches that would descend into the directory structure are ignored, e.g., */.

i don't understand what that mean, someone can give me a example code to show how it works?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-10-17 09:49:09 -0600

robrwo gravatar image

I've never used it, but it means that that files matching the file specification are ignored, for example

file { '/some/dir':
  ensure => present,
  owner => 'user',
  ignore => '*.txt',
  recurse => 1,

would change the owner of all files to "user", except files matching "*.txt".

edit flag offensive delete link more

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: 2014-10-16 20:36:16 -0600

Seen: 269 times

Last updated: Oct 17 '14