Im0 / cisco_upgrader

Upgrade Cisco network device images
5 stars 4 forks source link

fail at Task: Executing dir flash on remote device #2

Closed declanrafferty closed 4 years ago

declanrafferty commented 4 years ago

Hi,

I'm testing upgrading a Cisco 3750 using cisco_upgrader but I keep getting a fatal failure at the Executing dir flash on remote device Task.

I'm trying to upgrade:

The output for the failure is:

TASK [im0.cisco_upgrader : check > Executing dir flash on remote device] ** fatal: [WS-C3750-48TS]: FAILED! => {"changed": false, "msg": "dir flash:\r\ndir flash:\r\n ^\r\n% Invalid input detected at '^' marker.\r\n\r\nWS-C3750-48TS>"}

PLAY RECAP **** WS-C3750-48TS : ok=9 changed=0 unreachable=0 failed=1 skipped=9 rescued=0 ignored=0

The output of dir flash: on the switch is:

WS-C3750-48TS#dir flash: Directory of flash:/

2 -rwx 4120 Mar 2 1993 01:29:22 +00:00 multiple-fs 3 -rwx 12823 Mar 2 1993 01:29:21 +00:00 config.text 5 -rwx 52913 Nov 19 2011 13:00:19 +00:00 config_19112011 6 -rwx 12098310 Sep 28 2013 00:21:04 +00:00 c3750-ipbasek9-mz.122-55.SE5.bin 7 -rwx 57422 Nov 19 2011 13:00:52 +00:00 config_new_19112011 8 -rwx 1939 Mar 2 1993 01:29:21 +00:00 private-config.text 9 -rwx 58043 Sep 28 2013 04:15:33 +00:00 config.text.backup 10 -rwx 1961 Sep 28 2013 04:15:33 +00:00 private-config.text.backup

15998976 bytes total (3707392 bytes free)

I can't find what is causing this failure. Can anyone advise?

Thanks

declanrafferty commented 4 years ago

Sorted. Issue with commands trying to run in EXEC mode rather than Privileged mode. Added ansible_become=yes to host file and working now.

Im0 commented 4 years ago

Hey @declanrafferty - sorry about the delay in reply. Great news! Glad to hear that you got it working. Perhaps a warning should be printed if priviledge mode is not adequate as the upgrade probably won't work either.