mirror of https://github.com/ansible/ansible.git
Split on newlines when searching for become prompt
The fix for leading junk in sudo output:pull/23087/headfee6e29
causes 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 infee6e29
ends 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
parent
4eba248a8e
commit
6f77498700
Loading…
Reference in New Issue