No concurrency when using delegate_to #1197
Labels
affects-0.3
Issues related to 0.3.X Mitogen releases
bug
Code feature that hinders desired execution outcome
Background: we have a playbook that loads a new BIOS on a server, using a command-line tool that runs on the controller and remotely uploads the BIOS. This takes about 20-30 minutes. Since it runs on the controller, we use
delegate_to: localhost
.With the standard ansible strategy, this works fine, but when using mitogen, the executions are serialised, and it takes much longer to update a fleet.
I've put a minimal example below.
Which version of Ansible are you running? ansible-10.6.0, ansible-core-2.17.6
Is your version of Ansible patched in any way? No, installed directly from pip in a fresh virtualenv.
Are you running with any custom modules, or
module_utils
loaded? NoHave you tried the latest master version from Git? No, using 0.3.18
Do you have some idea of what the underlying problem may be? No
Mention your host and target OS and versions: Ubuntu 24.04 on host (targets are not connected to)
Mention your host and target Python versions: Python 3.12.3
To reproduce
ansible.cfg:
play.yml:
inventory:
Running
ansible-playbook play.yml
takes ±20s as the sleeps run in parallel.Running
ANSIBLE_STRATEGY=mitogen_linear
takes ±40s as the sleeps run serially.The text was updated successfully, but these errors were encountered: