Change the ssh+sudo debug messages to vvv for easier troubleshooting in awx+tower

This commit is contained in:
James Tanner 2017-10-30 10:31:42 -04:00 committed by Brian Coca
parent 4a19482413
commit ded0b6ed83

View file

@ -770,23 +770,23 @@ class Connection(ConnectionBase):
if states[state] == 'awaiting_escalation': if states[state] == 'awaiting_escalation':
if self._flags['become_success']: if self._flags['become_success']:
display.debug('Escalation succeeded') display.vvv('Escalation succeeded')
self._flags['become_success'] = False self._flags['become_success'] = False
state += 1 state += 1
elif self._flags['become_error']: elif self._flags['become_error']:
display.debug('Escalation failed') display.vvv('Escalation failed')
self._terminate_process(p) self._terminate_process(p)
self._flags['become_error'] = False self._flags['become_error'] = False
raise AnsibleError('Incorrect %s password' % self._play_context.become_method) raise AnsibleError('Incorrect %s password' % self._play_context.become_method)
elif self._flags['become_nopasswd_error']: elif self._flags['become_nopasswd_error']:
display.debug('Escalation requires password') display.vvv('Escalation requires password')
self._terminate_process(p) self._terminate_process(p)
self._flags['become_nopasswd_error'] = False self._flags['become_nopasswd_error'] = False
raise AnsibleError('Missing %s password' % self._play_context.become_method) raise AnsibleError('Missing %s password' % self._play_context.become_method)
elif self._flags['become_prompt']: elif self._flags['become_prompt']:
# This shouldn't happen, because we should see the "Sorry, # This shouldn't happen, because we should see the "Sorry,
# try again" message first. # try again" message first.
display.debug('Escalation prompt repeated') display.vvv('Escalation prompt repeated')
self._terminate_process(p) self._terminate_process(p)
self._flags['become_prompt'] = False self._flags['become_prompt'] = False
raise AnsibleError('Incorrect %s password' % self._play_context.become_method) raise AnsibleError('Incorrect %s password' % self._play_context.become_method)