Skip to content

Commit 969687f

Browse files
Platform-specific error message
Signed-off-by: Stew Francis <[email protected]>
1 parent d2c0330 commit 969687f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/integration/targets/cics_cmci/playbooks/cmci_incorrect_host.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
hosts: 'localhost'
88
gather_facts: 'true'
99

10+
vars:
11+
mac_message: >-
12+
.*nodename nor servname provided, or not known$
13+
linux_message: >-
14+
.*Name or service not known$
15+
error_message: "{{ mac_message if ansible_system == 'Darwin' else linux_message }}"
16+
1017
tasks:
1118
- name: Print all available facts
1219
ansible.builtin.debug:
@@ -34,4 +41,4 @@
3441
that:
3542
- result.failed is false
3643
- '{{ result.msg[:76] == "Error performing CMCI request: <urllib3.connection.HTTPSConnection object at" }}'
37-
- '{{ result.msg[-92:] == "Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known" }}'
44+
- '{{ result.msg is match(error_message) }}'

0 commit comments

Comments
 (0)