Method: Chef::LocalMode.with_server_connectivity
- Defined in:
- lib/chef/local_mode.rb
.with_server_connectivity ⇒ Object
Create a chef local server (if the configuration requires one) for the duration of the given block.
# This ...
with_server_connectivity { stuff }
# Is exactly equivalent to this ...
Chef::LocalMode.setup_server_connectivity
begin
stuff
ensure
Chef::LocalMode.destroy_server_connectivity
end
39 40 41 42 43 44 45 46 |
# File 'lib/chef/local_mode.rb', line 39 def self.with_server_connectivity setup_server_connectivity begin yield ensure destroy_server_connectivity end end |