docs(ansible): document Ubuntu sudo-rs become workaround - #17
Conversation
Ubuntu 25.10+/26.04 ship sudo-rs as the default sudo, which doesn't honor the custom -p become prompt Ansible waits on — so --ask-become-pass hangs with "Timeout waiting for privilege escalation prompt". Add a per-host, commented `ansible_become_exe: /usr/bin/sudo.ws` opt-in (routes become through classic sudo) plus explanatory notes in the inventory template and README. Kept opt-in and commented so the Ubuntu-26-only path never breaks Debian bookworm / Ubuntu noble hosts. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Code Review
This pull request adds documentation and configuration workarounds for an issue where Ansible's privilege escalation hangs on Ubuntu 25.10+ and 26.04 due to the default use of sudo-rs. The reviewer provided valuable feedback pointing out that the classic sudo binary path is /usr/bin/sudo.classic rather than /usr/bin/sudo.ws, and recommended correcting this path across the README and inventory files, as well as removing the unofficial codename 'Questing' for Ubuntu 25.10.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Ubuntu sudo-rs workaround: 25.10 (Questing) and 26.04 ship sudo-rs as the default | ||
| # /usr/bin/sudo. Ansible's sudo become plugin passes a custom `-p` prompt sentinel and | ||
| # waits for it before sending the become password; sudo-rs does not honor that custom | ||
| # `-p`, so `--ask-become-pass` / -K hangs with "Timeout waiting for privilege | ||
| # escalation prompt". Classic sudo is still installed at /usr/bin/sudo.ws and honors | ||
| # the -p prompt Ansible expects — point become at it with the per-host | ||
| # `ansible_become_exe` line below. Password sudo is preserved (no NOPASSWD, no host | ||
| # change). Only uncomment on an affected host: `sudo --version` reports "sudo-rs" | ||
| # and/or /usr/bin/sudo.ws exists. Leave it commented on Debian bookworm / Ubuntu | ||
| # noble — that path does not exist there. |
There was a problem hiding this comment.
The path /usr/bin/sudo.ws does not appear to be a standard path for classic sudo in Ubuntu or Debian. Typically, when sudo-rs is co-installed or default, the classic sudo binary is provided by the sudo-classic package and is located at /usr/bin/sudo.classic. Additionally, the codename for Ubuntu 25.10 has not been officially announced as 'Questing'. It is safer to refer to it simply as '25.10'.
# Ubuntu sudo-rs workaround: 25.10 and 26.04 ship sudo-rs as the default
# /usr/bin/sudo. Ansible's sudo become plugin passes a custom `-p` prompt sentinel and
# waits for it before sending the become password; sudo-rs does not honor that custom
# `-p`, so `--ask-become-pass` / -K hangs with "Timeout waiting for privilege
# escalation prompt". Classic sudo is still installed at /usr/bin/sudo.classic and honors
# the -p prompt Ansible expects — point become at it with the per-host
# `ansible_become_exe` line below. Password sudo is preserved (no NOPASSWD, no host
# change). Only uncomment on an affected host: `sudo --version` reports "sudo-rs"
# and/or /usr/bin/sudo.classic exists. Leave it commented on Debian bookworm / Ubuntu
# noble — that path does not exist there.
| decdn-node-1: | ||
| ansible_host: REPLACE_WITH_NODE_VPS_IP_OR_DNS | ||
| ansible_user: root | ||
| # ansible_become_exe: /usr/bin/sudo.ws # Ubuntu sudo-rs workaround — see note above |
| anvil-vps: | ||
| ansible_host: REPLACE_WITH_INTERNAL_VPS_IP_OR_DNS | ||
| ansible_user: root | ||
| # ansible_become_exe: /usr/bin/sudo.ws # Ubuntu sudo-rs workaround — see note above |
| - **Ubuntu sudo-rs note:** 25.10+ (and 26.04) ship `sudo-rs` as the default `sudo`, | ||
| which doesn't honor the custom `-p` become prompt Ansible relies on — so | ||
| `--ask-become-pass` hangs with "Timeout waiting for privilege escalation prompt". On | ||
| an affected host uncomment `ansible_become_exe: /usr/bin/sudo.ws` for that host in | ||
| `hosts.yml` (see the note in `inventory/hosts.yml.example`) to route become through | ||
| classic sudo. |
There was a problem hiding this comment.
Update the reference to classic sudo path to /usr/bin/sudo.classic to match the standard path on Ubuntu/Debian systems.
| - **Ubuntu sudo-rs note:** 25.10+ (and 26.04) ship `sudo-rs` as the default `sudo`, | |
| which doesn't honor the custom `-p` become prompt Ansible relies on — so | |
| `--ask-become-pass` hangs with "Timeout waiting for privilege escalation prompt". On | |
| an affected host uncomment `ansible_become_exe: /usr/bin/sudo.ws` for that host in | |
| `hosts.yml` (see the note in `inventory/hosts.yml.example`) to route become through | |
| classic sudo. | |
| - **Ubuntu sudo-rs note:** 25.10+ (and 26.04) ship `sudo-rs` as the default `sudo`, | |
| which doesn't honor the custom `-p` become prompt Ansible relies on — so | |
| `--ask-become-pass` hangs with "Timeout waiting for privilege escalation prompt". On | |
| an affected host uncomment `ansible_become_exe: /usr/bin/sudo.classic` for that host in | |
| `hosts.yml` (see the note in `inventory/hosts.yml.example`) to route become through | |
| classic sudo. |
There was a problem hiding this comment.
Pull request overview
Documents an Ansible “become” workaround for Ubuntu hosts where sudo-rs is the default /usr/bin/sudo, causing --ask-become-pass to hang due to prompt handling differences. This fits the repo by improving operator-facing guidance without changing any deployment behavior.
Changes:
- Add an Ubuntu
sudo-rsworkaround note to the Ansible Requirements documentation. - Add a detailed comment block in the inventory template plus per-host, commented
ansible_become_exe: /usr/bin/sudo.wsopt-in lines.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| ansible/README.md | Adds a Requirements note describing the Ubuntu sudo-rs become prompt issue and the per-host workaround. |
| ansible/inventory/hosts.yml.example | Documents the workaround in the template and provides commented per-host ansible_become_exe lines for opt-in. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Ubuntu sudo-rs workaround: 25.10 (Questing) and 26.04 ship sudo-rs as the default | ||
| # /usr/bin/sudo. Ansible's sudo become plugin passes a custom `-p` prompt sentinel and | ||
| # waits for it before sending the become password; sudo-rs does not honor that custom | ||
| # `-p`, so `--ask-become-pass` / -K hangs with "Timeout waiting for privilege | ||
| # escalation prompt". Classic sudo is still installed at /usr/bin/sudo.ws and honors | ||
| # the -p prompt Ansible expects — point become at it with the per-host | ||
| # `ansible_become_exe` line below. Password sudo is preserved (no NOPASSWD, no host |
| @@ -39,6 +39,12 @@ baseline host hardening — DevSec os/ssh, nftables default-deny inbound, | |||
| - Control machine: **Ansible ≥ 2.15**, `ansible-lint`, `yamllint` (and Docker + `molecule` | |||
| + `molecule-plugins[docker]` for the anvil molecule scenario). | |||
| - Target: **Debian (bookworm)** host(s) reachable over SSH with a sudo-capable user. | |||
What
Documents a workaround for Ubuntu 25.10+ / 26.04 hosts, which ship
sudo-rsas the default/usr/bin/sudo.Ansible's sudo become plugin passes a custom
-pprompt sentinel and waits for it before sending the become password;sudo-rsdoes not honor that custom-p, so--ask-become-pass/-Khangs with "Timeout waiting for privilege escalation prompt." Classic sudo is still installed at/usr/bin/sudo.wsand honors the prompt Ansible expects.Changes
ansible/inventory/hosts.yml.example— explanatory comment block + a commented, per-host# ansible_become_exe: /usr/bin/sudo.wsopt-in line under each host (decdn-node-1,anvil-vps).ansible/README.md— a short Ubuntu sudo-rs note under Requirements.Why opt-in / per-host
/usr/bin/sudo.wsexists only on Ubuntu 25.10+/26.04. On Debian bookworm / Ubuntu noble the path is absent, so a repo-wide default would break every existing target. Keeping it commented and per-host means operators uncomment it only on affected hosts (detect viasudo --versionreportingsudo-rsand/or/usr/bin/sudo.wsexisting). Password sudo is preserved — no NOPASSWD, no host change.Notes
inventory/hosts.ymlis git-local; only the committed template + README are touched here.Verification
yaml.safe_loadon the template parses (commented lines correctly ignored).yamllint inventory/hosts.yml.exampleclean; no line over 120 chars.🤖 Generated with Claude Code