lib/beaker/network_manager.rb in beaker-2.37.0 vs lib/beaker/network_manager.rb in beaker-2.38.0
- old
+ new
@@ -10,14 +10,16 @@
#Determine if a given host should be provisioned.
#Provision if:
# - only if we are running with ---provision
# - only if we have a hypervisor
# - only if either the specific hosts has no specification or has 'provision' in its config
- # - always if it is a vagrant box (vagrant boxes are always provisioned as they always need ssh key hacking)
+ # - always if it is a vagrant or docker box (vagrant boxes are always provisioned
+ # as they always need ssh key hacking. docker boxes need to have docker_container_name
+ # specified)
def provision? options, host
command_line_says = options[:provision]
host_says = host['hypervisor'] && (host.has_key?('provision') ? host['provision'] : true)
- (command_line_says && host_says) or (host['hypervisor'] =~/vagrant/)
+ (command_line_says && host_says) or (host['hypervisor'] =~/(vagrant|docker)/)
end
def initialize(options, logger)
@logger = logger
@options = options