From 917fa51dcc7515a32659a462a06faceebf3a3b0e Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Fri, 12 Jul 2019 18:01:40 -0400 Subject: [PATCH] The prompt has a space after the colon so don't anchor the end of the string --- lib/ansible/runner/credential/machine_credential.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/runner/credential/machine_credential.rb b/lib/ansible/runner/credential/machine_credential.rb index b24a0af7e233..5f05408be95d 100644 --- a/lib/ansible/runner/credential/machine_credential.rb +++ b/lib/ansible/runner/credential/machine_credential.rb @@ -13,8 +13,8 @@ def command_line def write_password_file password_hash = { - "^SSH [pP]assword:$" => auth.password, - "^BECOME [pP]assword:$" => auth.become_password + "^SSH [pP]assword:" => auth.password, + "^BECOME [pP]assword:" => auth.become_password }.delete_blanks File.write(password_file, password_hash.to_yaml) if password_hash.present?