0
我正在编写一本食谱,在同一主机上安装多个tomcat实例。 我为多个实例创建了一个散列,并且此散列将具有shutdown_port和startup_port的键值对。 对于如 -厨师食谱如何将关键值传递给资源
instances:
instance1:
shutdown_port: 8005
startup_port: 8009
instance2:
shutdown_port: 8005
startup_port: 8009
对于每个实例(例如INSTANCE1),我想通过 “shutdown_port” 和 “startup_port” 我的资源。我怎样才能做到这一点 ?
样品配方呼叫 -
app['instances'].each do |name, attribs|
tomcat_multi_instances name do
attribs.each { |k, v| send(k, v) if v }
startup_port startup_port
shutdown_port shutdown_port
end
end