I use Puppet to prepare computers. I have a service running on the Tomcat 6 application server, and another manifest is dependent on this service (sending some REST requests as part of the installation). The problem is that the service is not available immediately after starting tomcat using:
service {"tomcat6": ensure => running, enable => true, hasstatus => true, hasrestart => true; }
So I need some kind of condition for another manifest that will ensure that the service really works (for example, checking which URL will be available). And if he is not ready yet, wait a while and try again with some restriction on the number of attempts.
Is there any idiomatic solution of the Puppeteer, or some other that will achieve this?
Note. Sleep is not a solution.
source share