From b07113f358710008fdace2026b2373592608ef0c Mon Sep 17 00:00:00 2001 From: Till Maas Date: Mon, 31 Mar 2014 13:20:00 +0200 Subject: [PATCH] ssh: Properly check for wrong su password --- lib/ansible/runner/connection_plugins/ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/connection_plugins/ssh.py b/lib/ansible/runner/connection_plugins/ssh.py index 876f2063848..4b9ea6307a3 100644 --- a/lib/ansible/runner/connection_plugins/ssh.py +++ b/lib/ansible/runner/connection_plugins/ssh.py @@ -161,7 +161,7 @@ class Connection(object): if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)): raise errors.AnsibleError('Incorrect sudo password') - if self.runner.su and su and self.runner.sudo_pass: + if self.runner.su and su and self.runner.su_pass: incorrect_password = gettext.dgettext( "su", "Sorry") if stdout.endswith("%s\r\n%s" % (incorrect_password, prompt)):