vendredi 21 juin 2019

Ansible wait_for not response correct error

I trying to test a batch of connection but the connections that fail all error resposnses are "Timeout" but I know (I tested) some of them are "no route to host". How I can do that with wait_for in ansible?

- name: Test connectivity flow
  wait_for: 
    host: ""
    port: ""
    state: started         # Port should be open
    delay: 0               # No wait before first check (sec)
    timeout: 3             # Stop checking after timeout (sec)
  delegate_to: ""
  failed_when: false
  register: test_connectivity_flow_result

- name: Append result message to result list msg
  set_fact:
    result_list_msg: "Liquid error: Unknown operator is"

Current response: Timeout when waiting for 1.1.1.1:22

Expected response: No route to host 1.1.1.1:22

Aucun commentaire:

Enregistrer un commentaire