I would like to run a webservice and wait for a few seconds after to get the result.
What is the best way to achieve a wait in puppet ?
All relationships cause Puppet to manage one or more resources before one or more other resources. By default, unrelated resources are managed in the order in which they're written in their manifest file. If you declare an explicit relationship between resources, it will override this default ordering.
puppet job run --query 'nodes[certname] { facts {name = "operatingsystem" and value = "Debian" }}' A node group - from the console or the command line: puppet job run --node-group <node-group-id>
In Puppet, the combined configuration to be applied to a host is called a catalog, and the process of applying it is called a run. The Puppet client software is called the agent. Puppet calls the definition of the host itself a node. The Puppet server is called the master. exec resources.
You could use the linux sleep command with exec and stage it to run after the web-service. something like :
exec { 'wait_for_my_web_service' :
require => Service["my_web_service"],
command => "sleep 10 && /run/my/command/to/get/results/from/the/web/service",
path => "/usr/bin:/bin",
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With