Scenario: You want an exec command in a manifest to be invoked only if a certain file is on the Windows Server. You do not want the execution of a command to happen if a file does not exist in a certain location.
Solution: Incorporate the following lines into your manifest (.pp file).
exec { ‘cont_int”:
command => “echo continual > contint.txt”,
…
Continue reading “How to Use Conditional Logic With A Puppet Manifest For Executing a Command”