class PoiseApplication::Resources::Application::Provider
Provider
for `application`.
@since 5.0.0 @see Resource
@provides application
Public Instance Methods
action_deploy()
click to toggle source
`deploy` action for `application`. Creates the application base folder.
@return [void]
# File lib/poise_application/resources/application.rb, line 201 def action_deploy notifying_block do directory new_resource.path do owner new_resource.owner group new_resource.group mode '755' end end end
action_reload()
click to toggle source
`reload` action for `application`. Proxies to subresources.
@return [void]
# File lib/poise_application/resources/application.rb, line 235 def action_reload proxy_action(:reload) end
action_restart()
click to toggle source
`restart` action for `application`. Proxies to subresources.
@return [void]
# File lib/poise_application/resources/application.rb, line 228 def action_restart proxy_action(:restart) end
action_start()
click to toggle source
`start` action for `application`. Proxies to subresources.
@return [void]
# File lib/poise_application/resources/application.rb, line 214 def action_start proxy_action(:start) end
action_stop()
click to toggle source
`stop` action for `application`. Proxies to subresources.
@return [void]
# File lib/poise_application/resources/application.rb, line 221 def action_stop proxy_action(:stop) end
Private Instance Methods
proxy_action(action)
click to toggle source
Proxy an action to any subresources that support it.
@param action [Symbol] Action to proxy. @return [void]
# File lib/poise_application/resources/application.rb, line 245 def proxy_action(action) Chef::Log.debug("[#{new_resource} Running proxied #{action} action") new_resource.subresources.each do |r| begin r.run_action(action) if r.allowed_actions.include?(action) rescue Chef::Exceptions::UnsupportedAction # Don't care, just move on. end end end