Search code examples
deploymentpuppet

puppet: set global timeout for exec


I have a puppet manifest with many operations in exec, here an example of two of them:

Exec { path => "/bin" }
exec {
    "apt_get_update":
       timeout => 0,
       command => "/usr/bin/apt-get update";

     "dlmpi":
        timeout => 0,
        command => "wget http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.5.tar.gz",
        cwd     => "/usr/local";
}          

Is there a way to set the timeout globally so I do not have to repeat (and maybe forget) for each operation?


Solution

  • Try this code:

    Exec { timeout => 0 }
    

    More details you will find in article about resource defaults.

    UPDATE: You can also try using puppet collector. It gives you more control about which resources will have default values: amending-attributes-with-a-collector.