mirror of
https://github.com/ansible/ansible.git
synced 2026-07-29 08:27:01 +02:00
* Clean up interpreter discovery - Deprecated `auto_legacy` and `auto_legacy_silent` - Removed obsolete platform fallback config and logic - Replaced unit tests with integration tests - Increased test coverage
24 lines
534 B
YAML
24 lines
534 B
YAML
# Test discovery error handling when a connection failure is involved (raises AnsibleError).
|
|
|
|
- hosts: localhost
|
|
gather_facts: no
|
|
tasks:
|
|
- add_host:
|
|
name: bad_connection
|
|
ansible_connection: ssh
|
|
ansible_port: 1
|
|
ansible_host: localhost
|
|
ansible_python_interpreter: auto
|
|
ansible_pipelining: yes
|
|
|
|
- hosts: bad_connection
|
|
gather_facts: no
|
|
tasks:
|
|
- ping:
|
|
register: discovery
|
|
ignore_unreachable: yes
|
|
|
|
- assert:
|
|
that:
|
|
- discovery is unreachable
|