I’m trying to build a Windows Server (2016, 2019 and 2022) using Packer and Ansible within AWS and reusing code where I can. As part of the AMI creation it builds the image and sysprep it all OK, but then it creates an instance to perform some tests on the newly created AMI, but this is failing, it use to work until around July. I’ve even removed all the hardening to ensure its nothing from that.
- Error
test.amazon-ebs.test: Prevalidating any provided VPC information
test.amazon-ebs.test: Prevalidating AMI Name: windows-2016-2023-10-24t09-39-10z
test.amazon-ebs.test: Found Image ID: ami-0f191d7afe71ef99c
test.amazon-ebs.test: Found VPC ID: vpc-0688c234550620b82
test.amazon-ebs.test: Found Subnet ID: subnet-03f031d8fb5ec4473
test.amazon-ebs.test: Creating temporary keypair: packer_653790be-8348-6dea-8bb9-4229ad9e4511
test.amazon-ebs.test: Saving key for debug purposes: ec2_test.pem
test.amazon-ebs.test: Found Security Group(s): sg-0708434681fcea5ac
test.amazon-ebs.test: Launching a source AWS instance...
test.amazon-ebs.test: Adding tag: "Name": "windows-2016-185-test"
test.amazon-ebs.test: Adding tag: "Project": "image-hardening"
test.amazon-ebs.test: Adding tag: "trend-plan": "windows-min"
test.amazon-ebs.test: Adding tag: "BuildNumber": "185"
test.amazon-ebs.test: Adding tag: "ImageFamily": "windows-2016"
test.amazon-ebs.test: Adding tag: "CommitId": "8f6ceee8601f1510f9946124ba3db0892454ac27"
test.amazon-ebs.test: Adding tag: "InspectorID": "windows-2016-185"
test.amazon-ebs.test: Adding tag: "Project": "image-hardening"
test.amazon-ebs.test: Adding tag: "BuildNumber": "185"
test.amazon-ebs.test: Adding tag: "trend-plan": "windows-min"
test.amazon-ebs.test: Adding tag: "InspectorID": "windows-2016-185"
test.amazon-ebs.test: Adding tag: "CommitId": "8f6ceee8601f1510f9946124ba3db0892454ac27"
test.amazon-ebs.test: Adding tag: "ImageFamily": "windows-2016"
test.amazon-ebs.test: Adding tag: "Name": "windows-2016-185-test"
test.amazon-ebs.test: Adding tag: "Environment": "DEV"
test.amazon-ebs.test: Instance ID: i-03ed24d8c203b8c9a
test.amazon-ebs.test: Waiting for instance (i-03ed24d8c203b8c9a) to become ready...
test.amazon-ebs.test: Public DNS: ec2-79-125-76-178.eu-west-1.compute.amazonaws.com
test.amazon-ebs.test: Public IP: 79.125.76.178
test.amazon-ebs.test: Private IP: 10.0.0.254
test.amazon-ebs.test: Waiting for auto-generated password for instance...
test.amazon-ebs.test: It is normal for this process to take up to 15 minutes,
test.amazon-ebs.test: but it usually takes around 5. Please wait.
test.amazon-ebs.test:
test.amazon-ebs.test: Password retrieved!
test.amazon-ebs.test: Password (since debug is enabled): 6oMM4ekTakKcZKD=yu(R6CFfevmRZYHP
test.amazon-ebs.test: Using WinRM communicator to connect: 79.125.76.178
test.amazon-ebs.test: Waiting for WinRM to become available...
test.amazon-ebs.test: WinRM connected.
test.amazon-ebs.test: Connected to WinRM!
test.amazon-ebs.test: Setting a 1h30m0s timeout for the next provisioner...
test.amazon-ebs.test: Provisioning with Ansible...
test.amazon-ebs.test: Not using Proxy adapter for Ansible run:
test.amazon-ebs.test: Using WinRM Password from Packer communicator...
test.amazon-ebs.test: Executing Ansible: ansible-playbook -e packer_build_name="test" -e packer_builder_type=amazon-ebs -vvvvvv --diff -eansible_connection=winrm -e ansible_winrm_server_cert_validation=ignore -e ansible_winrm_operation_timeout_sec=3600 -e ansible_winrm_read_timeout_sec=7200 -e cis_min_score=90 -e cis_benchmark=CIS_Microsoft_Windows_Server_2016_Benchmark_v2.0.0-xccdf.xml -e profile=xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Member_Server -e build_number=185 -e commit_id=8f6ceee8601f1510f9946124ba3db0892454ac27 -e image_family=windows-2016 -e ansible_password=***** -i /tmp/packer-provisioner-ansible4047541749 /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/playbook.yml
test.amazon-ebs.test: ansible-playbook 2.10.17
test.amazon-ebs.test: config file = None
test.amazon-ebs.test: configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
test.amazon-ebs.test: ansible python module location = /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible
test.amazon-ebs.test: executable location = /root/.pyenv/versions/3.8.16/bin/ansible-playbook
test.amazon-ebs.test: python version = 3.8.16 (default, Feb 6 2023, 02:19:23) [GCC 7.5.0]
test.amazon-ebs.test: No config file found; using defaults
test.amazon-ebs.test: setting up inventory plugins
test.amazon-ebs.test: host_list declined parsing /tmp/packer-provisioner-ansible4047541749 as it did not pass its verify_file() method
test.amazon-ebs.test: script declined parsing /tmp/packer-provisioner-ansible4047541749 as it did not pass its verify_file() method
test.amazon-ebs.test: auto declined parsing /tmp/packer-provisioner-ansible4047541749 as it did not pass its verify_file() method
test.amazon-ebs.test: Parsed /tmp/packer-provisioner-ansible4047541749 inventory source with ini plugin
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/validity/tasks/validity.yml
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/cleanup/tasks/cleanup.yml
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/checks/tasks/checks.yml
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/ssm/tasks/win-ssm.yml
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.win_service to ansible.windows.win_service
test.amazon-ebs.test: Loading collection ansible.windows from /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible_collections/ansible/windows
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.win_scheduled_task_stat to community.windows.win_scheduled_task_stat
test.amazon-ebs.test: Loading collection community.windows from /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible_collectis_pam_valid.yml
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/mcs/tasks/mc
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/cis/tasks/cis.yml
test.amazon-ebs.test: statically imported: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/roles/cis/tasks/win-cis.yml
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.win_stat to ansible.windows.win_stat
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.win_shell to ansible.windows.win_shell
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.win_shell to ansible.windows.win_shell
test.amazon-ebs.test: Loading callback plugin default of type stdout, v2.0 from /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/callback/default.py
test.amazon-ebs.test: Attempting to use 'default' callback.
test.amazon-ebs.test: Skipping callback 'default', as we already have a stdout callback.
test.amazon-ebs.test: Attempting to use 'junit' callback.
test.amazon-ebs.test: Attempting to use 'minimal' callback.
test.amazon-ebs.test: Skipping callback 'minimal', as we already have a stdout callback.
test.amazon-ebs.test: Attempting to use 'oneline' callback.
test.amazon-ebs.test: Skipping callback 'oneline', as we already have a stdout callback.
test.amazon-ebs.test: Attempting to use 'tree' callback.
test.amazon-ebs.test:
test.amazon-ebs.test: PLAYBOOK: playbook.yml *********************************************************
test.amazon-ebs.test: Positional arguments: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/playbook.yml
test.amazon-ebs.test: verbosity: 6
test.amazon-ebs.test: connection: smart
test.amazon-ebs.test: timeout: 10
test.amazon-ebs.test: become_method: sudo
test.amazon-ebs.test: tags: ('all',)
test.amazon-ebs.test: diff: True
test.amazon-ebs.test: inventory: ('/tmp/packer-provisioner-ansible4047541749',)
test.amazon-ebs.test: extra_vars: ('packer_build_name="test"', 'packer_builder_type=amazon-ebs', 'ansible_connection=winrm', 'ansible_winrm_server_cert_validation=ignore', 'ansible_winrm_operation_timeout_sec=3600', 'ansible_winrm_read_timeout_sec=7200', 'cis_min_score=90', 'cis_benchmark=CIS_Microsoft_Windows_Server_2016_Benchmark_v2.0.0-xccdf.xml', 'profile=xccdf_org.cisecurity.benchmarks_profile_Level_1_-_Member_Server', 'build_number=185', 'commit_id=8f6ceee8601f1510f9946124ba3db0892454ac27', 'image_family=windows-2016', 'ansible_password=6oMM4ekTakKcZKD=yu(R6CFfevmRZYHP')
test.amazon-ebs.test: forks: 5
test.amazon-ebs.test: 1 plays in /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/playbook.yml
test.amazon-ebs.test:
test.amazon-ebs.test: PLAY [Test] ********************************************************************
test.amazon-ebs.test:
test.amazon-ebs.test: TASK [Gathering Facts] *********************************************************
test.amazon-ebs.test: task path: /codebuild/output/src4191/src/api.github.myidtest.com/image-hardening/tests/playbook.yml:2
test.amazon-ebs.test: redirecting (type: modules) ansible.builtin.setup to ansible.windows.setup
test.amazon-ebs.test: Using module file /root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible_collections/ansible/windows/plugins/modules/setup.ps1
test.amazon-ebs.test: Pipelining is enabled.
test.amazon-ebs.test: <79.125.76.178> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5985 TO 79.125.76.178
test.amazon-ebs.test: <79.125.76.178> WINRM CONNECT: transport=basic endpoint=http://79.125.76.178:5985/wsman
test.amazon-ebs.test: <79.125.76.178> WINRM OPEN SHELL: DCBA94C9-90C0-47C3-9487-D7A39D4179D2
test.amazon-ebs.test: EXEC (via pipeline wrapper)
test.amazon-ebs.test: <79.125.76.178> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-EncodedCommand', 'UABvAHcAZQByAFMAaABlAGwAbAAgAC0ATgBvAFAAcgBvAGYAaQBsAGUAIAAtAE4AbwBuAEkAbgB0AGUAcgBhAGMAdABpAHYAZQAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0ARQBuAGMAbwBkAGUAZABDAG8AbQBtAGEAbgBkACAASgBnAEIAagBBAEcAZwBBAFkAdwBCAHcAQQBDADQAQQBZAHcAQgB2AEE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cAQgBiAEEARABBAEEAWABRAEEAcABBAEEAbwBBAEoAZwBBAGsAQQBHAFUAQQBlAEEAQgBsAEEARwBNAEEAWAB3AEIAMwBBAEgASQBBAFkAUQBCAHcAQQBIAEEAQQBaAFEAQgB5AEEAQQA9AD0A']
test.amazon-ebs.test: <79.125.76.178> WINRM CLOSE SHELL: DCBA94C9-90C0-47C3-9487-D7A39D4179D2
test.amazon-ebs.test: The full traceback is:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
test.amazon-ebs.test: httplib_response = self._make_request(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
test.amazon-ebs.test: six.raise_from(e, None)
test.amazon-ebs.test: File "<string>", line 3, in raise_from
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
test.amazon-ebs.test: httplib_response = conn.getresponse()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1348, in getresponse
test.amazon-ebs.test: response.begin()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 316, in begin
test.amazon-ebs.test: version, status, reason = self._read_status()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 277, in _read_status
test.amazon-ebs.test: line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/socket.py", line 669, in readinto
test.amazon-ebs.test: return self._sock.recv_into(b)
test.amazon-ebs.test: ConnectionResetError: [Errno 104] Connection reset by peer
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
test.amazon-ebs.test: resp = conn.urlopen(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
test.amazon-ebs.test: retries = retries.increment(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
test.amazon-ebs.test: raise six.reraise(type(error), error, _stacktrace)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
test.amazon-ebs.test: raise value.with_traceback(tb)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
test.amazon-ebs.test: httplib_response = self._make_request(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 449, in _make_request
test.amazon-ebs.test: six.raise_from(e, None)
test.amazon-ebs.test: File "<string>", line 3, in raise_from
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 444, in _make_request
test.amazon-ebs.test: httplib_response = conn.getresponse()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1348, in getresponse
test.amazon-ebs.test: response.begin()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 316, in begin
test.amazon-ebs.test: version, status, reason = self._read_status()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 277, in _read_status
test.amazon-ebs.test: line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/socket.py", line 669, in readinto
test.amazon-ebs.test: return self._sock.recv_into(b)
test.amazon-ebs.test: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
_winrm_exec
test.amazon-ebs.test: resptuple = self.protocol.get_command_output(self.shell_id, command_id)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/protocol.py", line 449, in get_command_output
test.amazon-ebs.test: self._raw_get_command_output(shell_id, command_id)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/protocol.py", line 468, in _raw_get_command_output
test.amazon-ebs.test: res = self.send_message(xmltodict.unparse(req))
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/protocol.py", line 243, in send_message
test.amazon-ebs.test: resp = self.transport.send_message(message)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/transport.py", line 322, in send_message
test.amazon-ebs.test: response = self._send_message_request(prepared_request, message)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/transport.py", line 327, in _send_message_request
test.amazon-ebs.test: response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
test.amazon-ebs.test: r = adapter.send(request, **kwargs)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
test.amazon-ebs.test: raise ConnectionError(err, request=request)
test.amazon-ebs.test: requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn
test.amazon-ebs.test: conn = connection.create_connection(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/util/connection.py", line 95, in create_connection
test.amazon-ebs.test: raise err
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/util/connection.py", line 85, in create_connection
test.amazon-ebs.test: sock.connect(sa)
test.amazon-ebs.test: ConnectionRefusedError: [Errno 111] Connection refused
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
test.amazon-ebs.test: httplib_response = self._make_request(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request
test.amazon-ebs.test: conn.request(method, url, **httplib_request_kw)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connection.py", line 239, in request
test.amazon-ebs.test: super(HTTPConnection, self).request(method, url, body=body, headers=headers)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1256, in request
test.amazon-ebs.test: self._send_request(method, url, body, headers, encode_chunked)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1302, in _send_request
test.amazon-ebs.test: self.endheaders(body, encode_chunked=encode_chunked)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1251, in endheaders
test.amazon-ebs.test: self._send_output(message_body, encode_chunked=encode_chunked)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 1011, in _send_output
test.amazon-ebs.test: self.send(msg)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/http/client.py", line 951, in send
test.amazon-ebs.test: self.connect()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connection.py", line 205, in connect
test.amazon-ebs.test: conn = self._new_conn()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn
test.amazon-ebs.test: raise NewConnectionError(
test.amazon-ebs.test: urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f632ecf9670>: Failed to establish a new connection: [Errno 111] Connection refused
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
test.amazon-ebs.test: resp = conn.urlopen(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
test.amazon-ebs.test: retries = retries.increment(
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment
test.amazon-ebs.test: raise MaxRetryError(_pool, url, error or ResponseError(cause))
test.amazon-ebs.test: urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='79.125.76.178', port=5985): Max retries exceeded with url: /wsman (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f632ecf9670>: Failed to establish a new connection: [Errno 111] Connection refused'))
test.amazon-ebs.test:
test.amazon-ebs.test: During handling of the above exception, another exception occurred:
test.amazon-ebs.test:
test.amazon-ebs.test: Traceback (most recent call last):
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 158, in run
test.amazon-ebs.test: res = self._execute()
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/executor/task_executor.py", line 663, in _execute
test.amazon-ebs.test: result = self._handler.run(task_vars=variables)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/action/gather_facts.py", line 94,
test.amazon-ebs.test: res = self._execute_module(module_name=fact_module, module_args=mod_args, task_vars=task_vars, wrap_async=False)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/action/__init__.py", line 969, in_execute_module
test.amazon-ebs.test: res = self._low_level_execute_command(cmd, sudoable=sudoable, in_data=in_data)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/action/__init__.py", line 1121, in _low_level_execute_command
test.amazon-ebs.test: rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/connection/winrm.py", line 549, in exec_command
test.amazon-ebs.test: result = self._winrm_exec(cmd_parts[0], cmd_parts[1:], from_exec=True, stdin_iterator=stdin_iterator)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/ansible/plugins/connection/winrm.py", line 508, in_winrm_exec
test.amazon-ebs.test: self.protocol.cleanup_command(self.shell_id, command_id)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/protocol.py", line 390, in cleanup_command
test.amazon-ebs.test: res = self.send_message(xmltodict.unparse(req))
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/protocol.py", line 243, in send_message
test.amazon-ebs.test: resp = self.transport.send_message(message)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/transport.py", line 322, in send_message
test.amazon-ebs.test: response = self._send_message_request(prepared_request, message)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/winrm/transport.py", line 327, in _send_message_request
test.amazon-ebs.test: response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
test.amazon-ebs.test: r = adapter.send(request, **kwargs)
test.amazon-ebs.test: File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
test.amazon-ebs.test: raise ConnectionError(e, request=request)
test.amazon-ebs.test: requests.exceptions.ConnectionError: HTTPConnectionPool(host='79.125.76.178', port=5985): Max retries exceeded with url:/wsman (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f632ecf9670>: Failed to establish a new connection: [Errno 111] Connection refused'))
test.amazon-ebs.test: fatal: [default]: FAILED! => {
test.amazon-ebs.test: "msg": "Unexpected failure during module execution.",
test.amazon-ebs.test: "stdout": ""
test.amazon-ebs.test: }
test.amazon-ebs.test:
test.amazon-ebs.test: PLAY RECAP *********************************************************************
test.amazon-ebs.test: default : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0