mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
The fix for leading junk in sudo output:fee6e29causes problems with ssh + sudo. On the initial connection using ControlPersist, the output that we scan for the prompt contains both the command we're sending to configure the prompt and the prompt itself. The code infee6e29ends up sending the password when it sees the line configuring the prompt which is too early. Switch to a version that splits on lines and then checks whether the first or last line starts with the prompt to decide if it's time to send the password. Fixes #23054 References #20858