Ask Your Question

how to stop puppet enforcement on puppet node side for only one directory resource

asked 2015-10-07 09:35:12 -0600

Barani Kumar gravatar image

In node many folders manged by puppet I want to stop puppet enforcement for one directory.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-07 11:19:30 -0600

ramindk gravatar image

If you read the docs for the file resource you'll see that you can set replace => false. Here's an example.

file { '/var/www/':
  ensure  => directory,
  source  => 'puppet:///somemod/www',
  recurse => true,

file { '/var/www/donttouch':
  ensure  => directory,
  replace => false,

The more specific resource shoudl take precedence, but make sure to test it before it goes to production.

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: 2015-10-07 09:35:12 -0600

Seen: 47 times

Last updated: Oct 07 '15