Last active
January 16, 2018 03:13
-
-
Save GeoffWilliams/ba1bdf25b455ea93a596be775ef1cfd5 to your computer and use it in GitHub Desktop.
Puppet exec based "host if statement": Sometimes you want to run an action based on whether a command executes or not. Thats a 'fact' right? - but facts only execute every puppet run so if you want to do something like check that a port is open somewhere you would have to wait 30 minutes after configuring a fact with the destination before you c…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exec { "/bin/true": | |
| before => Exec['tada'], | |
| } | |
| exec { "tada": | |
| command => "/bin/touch /tada", | |
| } | |
| ~> exec { "next": | |
| refreshonly => true, | |
| command => "/bin/touch /boom", | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment