【发布时间】:2016-06-11 23:24:43
【问题描述】:
我将提供者定义如下:
action :start do
...
end
action :stop do
...
end
action :restart do
...
end
现在我不想在restart 中重写stop 和start 的实现,而是在action :restart 中调用action :stop 然后action :start,如下所示:
action :restart do
action :stop
action :start
end
有没有办法做到这一点?
编辑 - 如 Coderanger 回答中所述,解决方案是:
action :restart do
action_stop
action_start
end
【问题讨论】:
标签: ruby chef-infra lwrp