Creating dynamic resource in cookbook
- by zsong
Long story short, here is my code:
template "...." do
....
notifies :restart,"service[myservice_One]"
notifies :restart,"service[myservice_Two]"
end
['One', 'Two'].each do |proj|
service 'myservice_#{proj}' do
start_command "setsid /etc/init.d/my_command #{proj} start"
stop_command "setsid /etc/init.d/my_command…