diff --git a/tasks/abs.rb b/tasks/abs.rb index 4c17e7b..04e83a7 100755 --- a/tasks/abs.rb +++ b/tasks/abs.rb @@ -91,7 +91,7 @@ def provision(platform, inventory_location, vars) data.each do |host| if platform_uses_ssh(host['type']) node = { 'uri' => host['hostname'], - 'config' => { 'transport' => 'ssh', 'ssh' => { 'user' => ENV['ABS_USER'], 'host-key-check' => false } }, + 'config' => { 'transport' => 'ssh', 'ssh' => { 'user' => ENV['ABS_USER'], 'host-key-check' => false, 'connect-timeout' => 120 } }, 'facts' => { 'provisioner' => 'abs', 'platform' => host['type'], 'job_id' => job_id } } if !ENV['ABS_SSH_PRIVATE_KEY'].nil? && !ENV['ABS_SSH_PRIVATE_KEY'].empty? node['config']['ssh']['private-key'] = ENV['ABS_SSH_PRIVATE_KEY'] @@ -101,7 +101,7 @@ def provision(platform, inventory_location, vars) group_name = 'ssh_nodes' else node = { 'uri' => host['hostname'], - 'config' => { 'transport' => 'winrm', 'winrm' => { 'user' => ENV['ABS_WIN_USER'], 'password' => ENV['ABS_PASSWORD'], 'ssl' => false } }, + 'config' => { 'transport' => 'winrm', 'winrm' => { 'user' => ENV['ABS_WIN_USER'], 'password' => ENV['ABS_PASSWORD'], 'ssl' => false, 'connect-timeout' => 120 } }, 'facts' => { 'provisioner' => 'abs', 'platform' => host['type'], 'job_id' => job_id } } group_name = 'winrm_nodes' end diff --git a/tasks/docker.rb b/tasks/docker.rb index ef9490f..ca6f0e3 100755 --- a/tasks/docker.rb +++ b/tasks/docker.rb @@ -162,7 +162,7 @@ def provision(image, inventory_location, vars) 'uri' => "#{hostname}:#{front_facing_port}", 'config' => { 'transport' => 'ssh', - 'ssh' => { 'user' => 'root', 'password' => 'root', 'port' => front_facing_port, 'host-key-check' => false } + 'ssh' => { 'user' => 'root', 'password' => 'root', 'port' => front_facing_port, 'host-key-check' => false, 'connect-timeout' => 120 } }, 'facts' => { 'provisioner' => 'docker', diff --git a/tasks/docker_exp.rb b/tasks/docker_exp.rb index 8ffb9b4..31ce40d 100755 --- a/tasks/docker_exp.rb +++ b/tasks/docker_exp.rb @@ -29,7 +29,7 @@ def provision(docker_platform, inventory_location, vars) container_id = run_local_command(creation_command).strip[0..11] fix_missing_tty_error_message(container_id) unless platform_is_windows?(docker_platform) node = { 'uri' => container_id, - 'config' => { 'transport' => 'docker', 'docker' => { 'shell-command' => @shell_command } }, + 'config' => { 'transport' => 'docker', 'docker' => { 'shell-command' => @shell_command, 'connect-timeout' => 120 } }, 'facts' => { 'provisioner' => 'docker_exp', 'container_id' => container_id, 'platform' => docker_platform } } unless vars.nil? var_hash = YAML.safe_load(vars) diff --git a/tasks/vagrant.rb b/tasks/vagrant.rb index ac9e1c1..eee9273 100755 --- a/tasks/vagrant.rb +++ b/tasks/vagrant.rb @@ -150,7 +150,8 @@ def provision(platform, inventory_location, enable_synced_folder, provider, cpus 'host' => remote_config['hostname'], 'host-key-check' => remote_config['stricthostkeychecking'], 'port' => remote_config['port'], - 'run-as' => 'root' + 'run-as' => 'root', + 'connect-timeout' => 120 } }, 'facts' => { @@ -173,7 +174,8 @@ def provision(platform, inventory_location, enable_synced_folder, provider, cpus 'winrm' => { 'user' => remote_config['user'], 'password' => remote_config['password'], - 'ssl' => remote_config['uses_ssl'] + 'ssl' => remote_config['uses_ssl'], + 'connect-timeout' => 120 } }, 'facts' => {