Ansible's sudo Prompt Breaks on Ubuntu 26.04 Because sudo-rs Prints Something Extra. The Fix Is in ansible-core 2.22.0. Here Is How I'd Fix a Small Fleet Today.
Run an Ansible playbook with a sudo password against a fresh Ubuntu 26.04 server and it can fail with Timeout (12s) waiting for privilege escalation prompt. Jeff Geerling wrote it up on November 25: the sudo-rs shipped with Ubuntu 26.04 prints an extra string before its password prompt, and Ansible's prompt matching doesn't recognize it. The fix landed in ansible-core 2.22.0.
This is the kind of bug that only hurts small operators. A platform team has CI for its playbooks. A solo developer has four playbooks that worked last year and a new LTS box that won't take them.
What is going on
Ubuntu replaced the classic C sudo (often called sudo.ws, after its website) with sudo-rs, a Rust rewrite, as the default starting with 25.10. That made 26.04 the first LTS where most people meet it.
Ansible's become plugin works by passing sudo a custom prompt and then waiting to see that exact prompt before sending your password. The Ansible issue tracking this, #85837, explains that sudo-rs only gained support for the -p prompt flag in version 0.2.5, and that the prompt it produces is wrapped in extra text Ansible didn't expect. Ansible sees output it doesn't recognize, keeps waiting, and gives up after 12 seconds.
If you run passwordless sudo for your deploy user, you probably never noticed. If you use -K or ansible_become_password, you did.
The three ways to fix it
In order of how I'd reach for them.
Upgrade Ansible on the control machine
The clean fix is on your laptop, not the server. Geerling reports the fix is in ansible-core 2.22.0, and that backports are going into several older release lines. Upgrading was enough for him:
pip install -U ansible ansible --version # confirm ansible-core is 2.22.0 or later
If you installed Ansible through Homebrew, pipx or your distro's package manager, upgrade it there instead. pyinfra had the same problem, and Geerling says its fix is in 3.11.
Point one host at classic sudo
If you can't upgrade the control machine today, maybe because a client project pins an older ansible-core, tell Ansible to use the classic binary on the affected hosts. Ubuntu 26.04 still ships it as sudo.ws:
[web] app1.example.com ansible_become_exe=sudo.ws
This is the option I'd pick for a pinned project. It's per host, it's visible in the inventory, and it's easy to delete later.
Switch the server back to classic sudo
The heavier option is changing the system default on the server:
sudo update-alternatives --config sudo
I'd avoid this unless you have other tools that break with sudo-rs. It changes behavior for every user and script on the box, and it's the kind of change you forget you made.
The rollout order for a small fleet
Upgrade Ansible on the control machine first. Run your most boring playbook, the one that only installs packages, against a single 26.04 host with --check. If that passes, run it for real. Then run the rest.
Pin ansible-core in a requirements.txt next to your playbooks once it works. The real failure here wasn't the bug. It was that nothing told you a new OS would change the prompt your tooling depends on, and pinning the control side at least makes the other half of that equation predictable.
The other Ubuntu 26.04 headache this week
The same week, security researcher Hanno Böck posted to the oss-security list about Ubuntu's slow kernel security fixes. His post says details of CVE-2026-99288, a remote memory corruption bug in the kernel's TCP stack, were published in mid-November, and that as of November 25 Ubuntu had no published fix while other distributions had one ready at disclosure. He also lists a KVM host escape on AMD, CVE-2026-99312, without an Ubuntu fix as of the same date.
Geerling ends his own post saying he may move servers back to Debian. I wouldn't switch distributions over one prompt bug. But a prompt bug plus slow kernel patches in the same week is a fair reason to check how fast your distro ships fixes for the things you run, instead of assuming the LTS label means fast.
The honest take
The sudo-rs change is defensible. Memory-safe rewrites of setuid tools are a reasonable thing for a distro to want, and most of the friction is tools that assumed one exact prompt for decades. Where I could be wrong is on the backports: the exact list of fixed older lines comes from Geerling's reading of the thread, not a release note I could check, so verify your version before relying on it.
What I'd do today: upgrade ansible-core on the machine you deploy from, add ansible_become_exe=sudo.ws only where a pinned project needs it, and read the kernel CVE status for your own servers rather than waiting for a newsletter to tell you.
Author
Lukas
@lukcombinator