> For example, the following code throws an error if the machine has anything
> other than 8 cores.
>
> exec { "echo 'This machine does not have 8 cores!'; exit 1":
> unless => "facter processorcount | grep -q 8",
> }
>
> The "; exit 1" changes this from a Notice to an Error, but it seem
Hi,
What's the best idiom for executing a command on every Puppet run and
triggering an error if the command fails?
For example, the following code throws an error if the machine has anything
other than 8 cores.
exec { "echo 'This machine does not have 8 cores!'; exit 1":
unless => "fact