FAQ
Add "refreshonly => true" to the exec definition.

GS
On 17/01/2014 6:17 pm, "kaustubh chaudhari" 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 puppet-users+unsubscribe@googlegroups.com.
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 puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAHpidMBytDPm%2BpbMtBo2xtd9SGuHOwPQPTZcfUHBx653TwVH%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJan 17, '14 at 7:17a
activeJan 17, '14 at 7:29a
posts3
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase