On Thu, Jun 14, 2012 at 6:00 AM, PorkCharSui <cnoss...@gmail.com> wrote:
> I work at a university and my colleagues and I are considering Puppet for
> installing and configuring our linux workstations. Being a university we
> have a great variety in users, some very adept at maintaining their own
> system and some not so much.  Now we were wondering(and I can't find it in
> the documentation or on the intarwebz), can Puppet detect if a user has
> changed a *.conf file him(her)self and NOT do anything to that *.conf file?
> Since we have about 200 users now, which will probably grow to almost a
> 1000, we don't want to create different nodes which we than have to fill
> manually for the users who do know what they're doing.
> So my question is, can Puppet detect a user change on a file and in that
> case don't do anything, where it would normally replace the file?

If you just care about when content changes.

file { '/etc/sudoers':
  audit => content,
}

Upon changes you will see:
notice: /Stage[main]//File[/etc/sudoers]/content: audit change:
previously recorded value {md5}d41d8cd98f00b204e9800998ecf8427e has
been changed to {md5}c157a79031e1c40f85931829bc5fc552

If you have content you want to compare but not change the file:

file { '/etc/sudoers':
  source => 'puppet:///...',
  noop    => true,
}

HTH,

Nan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to