Ansible Times Out at 12 Seconds on Ubuntu 26.04 Because sudo-rs Prints Its Prompt Differently
Software / news
Ansible Times Out at 12 Seconds on Ubuntu 26.04 Because sudo-rs Prints Its Prompt Differently
The bug was filed against Ubuntu 25.10 in September 2025 and closed in April 2026, yet jeffgeerling.com reports it still hits users who run ansible-playbook -K on 26.04.
Running ansible-playbook main.yml -K against an Ubuntu 26.04 host fails at the first task with "Timeout (12s) waiting for privilege escalation prompt," Jeff Geerling wrote in a post published November 25. The cause is that Ubuntu now ships sudo-rs, a Rust rewrite of sudo, and Ansible does not recognise its prompt.
The fix exists. Which Ansible release carries it depends on the version you run.
What fails and why
Geerling's play dies at TASK [Gathering Facts], before any of his own tasks run. His post says sudo-rs prints an extra string ahead of the password prompt, which traditional sudo does not, and Ansible's sudo become plugin waits for one specific prompt.
The Ansible issue tracker shows the string. Issue 85837, titled "validate sudo become plugin against sudo-rs," quotes a prompt of the form [sudo: [sudo via ansible, key=...] password:] Password:. The original plugin expected the prompt at the start of the line, so the wrapped version never matched and the 12-second timer ran out.
The issue says sudo-rs did not support the -p prompt argument until version 0.2.5, and that it prints the extra text before handing over to PAM, the Linux authentication layer.
A bug that was known for 14 months
Issue 85837 was opened on September 9, 2025 by sivel, an Ansible maintainer, against Ubuntu 25.10 with sudo-rs 0.2.8. A later comment in the thread reports ansible-core 2.20.1 failing the same way. The issue was closed as resolved on April 27, 2026 and locked on May 12, 2026. The fix pull request is #86175, "sudo become plugin: add sudo-rs prompt support."
The tracker page does not name a release containing the fix, only that it landed in devel. Geerling's post fills that in: Ansible Core 2.22.0 has it, and backports are under way for 2.16, 2.18, 2.19 and 2.20, possibly 2.21. He ran pip install -U ansible and -K worked again.
Ubuntu 26.04 LTS packages sudo-rs 0.2.13, according to the sudo-rs repository, which is maintained under the Trifecta Tech Foundation organisation on GitHub and is dual-licensed Apache-2.0 and MIT. Ubuntu 25.10 and 26.04 both enable it by default.
Three ways out
| Option | Command or setting | Cost |
|---|---|---|
| Upgrade Ansible | pip install -U ansible | Needs a release with the fix |
| Point Ansible at the old binary | ansible_become_exe=sudo.ws in the inventory | Per-host setting |
| Switch sudo back | update-alternatives --config sudo on the host | Undoes Ubuntu's default |
Geerling's inventory example is dell-precision.local ansible_become_exe=sudo.ws. The sudo-rs README confirms the third route, the update-alternatives switch.
Pyinfra was hit by the same change. Geerling says its fix is pull request #1734, shipped in pyinfra 3.11.
The argument underneath
Geerling questions Ubuntu's decision to replace foundational utilities with Rust rewrites and argues that core Linux components should take longer to reach production. He points out that Fedora acts as a testing ground before Red Hat's production systems, while Ubuntu has no equivalent upstream. He says he is considering moving his servers back to Debian if Ubuntu is the only distribution doing this.
That is his opinion, and the Ubuntu 25.10 release did give the tools a full release cycle in the wild before the 26.04 LTS. The open question the sources leave is which pinned Ansible versions in the wild will receive the backport, since Geerling lists them as in progress. Anyone on an older 2.x branch should check the release notes before assuming -K works on a 26.04 target. Read the Anthropic Rust rewrite story for another Rust migration with measured results, and 1Password's GitHub breach for a different kind of tooling failure.
Sources
- 03sudo-rs
More in Software
- 01Tabernetes Makes Browser Tabs Kubernetes Nodes, Capped at One CPU and 256 MiBA single-author MIT project registers each open tab as a node, then argues in its README about what a tab can and cannot run.
- 02SessionGraph Indexes 14 Coding Agents' Local History, and Claude Code Keeps 30 Days by DefaultThe MIT desktop app says conversations stay local and publishing sends metadata only, but its friend comparison is undocumented.
- 03Prospero, a 250-Star Native C++ Coding Agent, Ships Its Own Bash and No Default ProviderA public-domain harness built on Dear ImGui runs headless or windowed, but the docs we read are silent on sandboxing.
- 04Pop!_OS 26.04 LTS Ships on Kernel 7.2.15, but 24.04 Users Wait Until December to UpgradeSystem76's Nov. 24 release adds Constellations themes and drawing-tablet tilt, and tells people who want all of it to reinstall.