傀儡如何使傀儡等待几秒钟

icn*_*icn 10 puppet wait

我想运行一个Web服务并等待几秒钟后才能得到结果.

在傀儡中等待的最佳方法是什么?

iam*_*ser 14

您可以将linux sleep命令与exec一起使用并将其暂存以在web服务之后运行.就像是 :

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",
}
Run Code Online (Sandbox Code Playgroud)