mitogen icon indicating copy to clipboard operation
mitogen copied to clipboard

Ansible ping module, "timeout" argument is ignored

Open setpill opened this issue 10 months ago • 2 comments

We have a task at the start of every deployment that tests for the presence of legacy credentials. It is of the form:

- name: Determine hosts with "{{ legacy_user }}" credentials
  ansible.builtin.wait_for_connection:
    timeout: 1
  register: legacy_reachable
  ignore_errors: yes
  vars:
    ansible_user: "{{ legacy_user }}"
    ansible_password: "{{ legacy_pass }}"

Without mitogen, this task returns in 1 second. With mitogen, it takes over 1 minute.

I had hoped a #1200 might fix this, however even with mitogen 0.3.22 it is still slow.

setpill avatar Feb 13 '25 16:02 setpill

I tried rewriting the above in an attempt to streamline things;

- name: Determine hosts with "{{ legacy_user }}" credentials
  ansible.builtin.ping:
    timeout: 1
  register: legacy_reachable
  ignore_unreachable: true
  vars:
    ansible_user: "{{ legacy_user }}"
    ansible_password: "{{ legacy_pass }}"

Unfortunately, it made no difference, so it seems the problem is not specific to the module mentioned.

setpill avatar Feb 19 '25 20:02 setpill

@setpill

  1. does this still occur?
  2. what version of Ansible and Mitogen are you using now?
  3. what is the error when it times out?

moreati avatar Dec 03 '25 09:12 moreati