Git Product home page Git Product logo

Comments (4)

jasonbarbee avatar jasonbarbee commented on August 30, 2024

Make sure there is not a force option on zeroing the keys... but if it helps - I ran into this type of issue with file prompts and saving to hit yes or not. Very different, but you might find a workaround like I did. The issue may be in PyNTC library (another related repo). As a workaround I modified my local PyNTC to send a few commands like this using the native.send_command_timing - which does not require a response and can extend the time that netmiko looks for the prompt again. Then I used it again to respond - in my case pressing enter, then the find_prompt presses enter and looks for a prompt to reset its state.
self.native.send_command_timing('show running-config')
self.native.send_command_timing('\n',delay_factor=10)
self.native.find_prompt()

from ntc-ansible.

itdependsnetworks avatar itdependsnetworks commented on August 30, 2024

@nerdofthenetwork carriage return \r should work. e.g. this worked for me:

    - ntc_config_command:
        provider: "{{ ios_provider }}"
        commands:
          - "do erase startup-config\r"

from ntc-ansible.

nerdofthenetwork avatar nerdofthenetwork commented on August 30, 2024

@itdependsnetworks that works! thanks!

- name: Remove/generate new crypto keys
     ntc_config_command:
       connection: ssh
       platform: cisco_ios_ssh
       commands:
       - "crypto key zeroize rsa\ryes\r"

from ntc-ansible.

itdependsnetworks avatar itdependsnetworks commented on August 30, 2024

Awesome! @GGabriele this can be closed

from ntc-ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.