On May 1, 2014, at 9:29 AM, [email protected] wrote: > Hi, > > I am using puppet enterprise 3.x . I have a manifest used to install and > manage custom application on my client node. > Part of manifest is :- > > file { 'app_config': > ensure => directory, > mode => 0644, > path => '/etc/cmas/app_config', > source => 'puppet:///modules/cmas/app_config', > recurse => true, > } > > file { 'config.xml': > audit => "content", > path => '/etc/cmas/app_config/config.xml', > } > > I want if file config.xml is changed, it should get back to old one from > source in next puppet run. > is it possible to do it ?
This is the default behavior of puppet, but by telling puppet to audit the config.xml file, you are preventing it from managing that file's content. As a result, the first file resource that recursively puts the app_config directory in place will actually *skip* creating the config.xml file. You'll get a notice like this: Notice: /Stage[main]/cmas/File[/etc/cmas/app_config/config.xml]/content: audit change: newly-recorded value absent If you want puppet to manage the content of that file and revert any changes, you'll need to stop auditing it. > Thanks and Regards, > Punit -- Peter Bukowinski -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5D8BFC09-9C04-40D9-8AED-6EBAAD64F076%40gmail.com. For more options, visit https://groups.google.com/d/optout.
