Skip to content

Commit

Permalink
Changed string check to verify that EOS device is not in config mode. (
Browse files Browse the repository at this point in the history
…#28332)

Changed string check to verify that EOS device is not in config mode. This was required in order to work with Arista 7500 series modular switches.
Resolves #2830
  • Loading branch information
bobbywatson3 authored and calfonso committed Aug 18, 2017
1 parent bd56e6c commit 8e8a7c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/action/eos.py
Expand Up @@ -76,7 +76,7 @@ def run(self, tmp=None, task_vars=None):
# make sure we are in the right cli context which should be
# enable mode and not config module
rc, out, err = connection.exec_command('prompt()')
while str(out).strip().endswith(')#'):
while '(config' in str(out):
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
connection.exec_command('exit')
rc, out, err = connection.exec_command('prompt()')
Expand Down

0 comments on commit 8e8a7c8

Please sign in to comment.