Hey GS, Thanks a lot! it work as expected. I also explored about other options that i can use with exec.
Cheerzzz! -Kaustubh On Friday, January 17, 2014 2:19:20 AM UTC-5, Gonzalo wrote: > > Add "refreshonly => true" to the exec definition. > > GS > On 17/01/2014 6:17 pm, "kaustubh chaudhari" <[email protected]<javascript:>> > wrote: > >> Hi All, >> >> I am not a programer or from the same background, trying to explore! >> Please excuse if you find this question silly. >> >> I was to exec a .bat file of if there are any changes to the files. Eg: i >> am trying to activate windows with the valid keys, however this action is >> required only once. >> My current code will execute it with every puppet run. How can i >> configure it to run it only when there are any changes to .bat file, say i >> wish to change the key. >> >> >> == >> file {'C:/Windows/puppetwinactivaion.bat': >> ensure => 'file', >> source => >> 'puppet:///modules/win642k8hardning/puppetwinactivaion.bat', >> mode => '0755', >> notify => Exec['puppetwinactivaion.bat'], >> } >> exec {'puppetwinactivaion.bat': >> require => File['C:/Windows/puppetwinactivaion.bat'], >> command => 'C:/Windows/puppetwinactivaion.bat', >> } >> == >> >> -Kaustubh >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/6695d390-ff19-4ba3-8016-75f428e51661%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > -- 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/7d6e6376-9e7f-4853-9e3c-c600a6b23167%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
