Ansible Playbook for Cisco IOS Upgrade

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 74

  • @MrEDGE1984
    @MrEDGE1984 2 ปีที่แล้ว +2

    Before this video Ansible was scary for me, now after watching this I can say I feel at home, Thanks ROger! Subscribed.

    • @RogerPerkin
      @RogerPerkin  2 ปีที่แล้ว +1

      Excellent, plenty more to come - any topics you would like covered?

    • @MrEDGE1984
      @MrEDGE1984 2 ปีที่แล้ว +1

      @@RogerPerkin Few more ansible videos would really help along!

    • @RogerPerkin
      @RogerPerkin  2 ปีที่แล้ว +1

      @@MrEDGE1984 Sure, pretty wide topic area though - any vendors or tasks you are working on?

  • @gouravrelhan7372
    @gouravrelhan7372 3 หลายเดือนก่อน

    Thank for this video. Much appreciated Roger !! :)

  • @MahmoudTaha92
    @MahmoudTaha92 2 ปีที่แล้ว +1

    Thank you for sharing this useful demo, it is awesome!

  • @uche8961
    @uche8961 4 ปีที่แล้ว +3

    Great video. Very practical. Just what I need as a beginner in ansible. You really won me over. Please do more of these practical stuffs.

  • @martinbuffleo
    @martinbuffleo 3 ปีที่แล้ว +2

    Great playbook. Worth adding and MD5 verify task, before reloading the router?

  • @kenmurphy4259
    @kenmurphy4259 4 ปีที่แล้ว +1

    Great video Roger and like the Ansible cap! :)

  • @bantacad
    @bantacad 2 ปีที่แล้ว +1

    Awesome video! In my opinion you can use command " write memory", which no require "Yes" for answer and for the network switch you can use console connection instead SSH. Cheers.

  • @Aldrin03
    @Aldrin03 4 ปีที่แล้ว +1

    excellent work - i'm starting to study ansible to automate daily tasks! appreciate your videos!

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      Great to hear! - I have more tutorials on my website www.rogerperkin.co.uk/network-automation/ansible/

  • @edsonrocks
    @edsonrocks 4 ปีที่แล้ว +2

    Thank you Roger, it's been a really useful demo.
    For a firmware upgrade routine like that I'd suggest checking the new firmware file md5 checksum before reloading the device just to prevent it turning into a brick that fails to reboot due to a corrupted file.
    Thank you for the video series, very cool, keep it up.

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +3

      Edson, this was just me getting to grips with the basics of the operation. I am aware there are more checks that can be done like check space in flash before pushing and MD5 checksum checks. Glad you enjoyed it.

    • @edsonrocks
      @edsonrocks 4 ปีที่แล้ว +1

      @@RogerPerkin I'm learning a lot with your videos. Thank you very much.

  • @sameerthorappa3356
    @sameerthorappa3356 4 ปีที่แล้ว +1

    Excellent video...we appreciate your time 👍👍👍.

  • @adonf
    @adonf 2 ปีที่แล้ว +1

    Hello, was the advertised "next video" where you automate all this stuff ever released ? Or is it part of the pay course ? Anyway, thanks for this very informative video.

  • @garyauer8070
    @garyauer8070 3 ปีที่แล้ว +1

    Absolutely excellent thanks

    • @RogerPerkin
      @RogerPerkin  3 ปีที่แล้ว +1

      Great, glad it helped!

  • @SadhamHussainsree
    @SadhamHussainsree 2 ปีที่แล้ว

    Great video.Thank you for sharing your knowledge.

  • @RohitPatil-qx9tf
    @RohitPatil-qx9tf 2 ปีที่แล้ว +1

    Thanks for the video.. A very good script.. Please upload new videos for upgrade of the fortigate and palo alto devices

    • @RogerPerkin
      @RogerPerkin  2 ปีที่แล้ว +2

      Ok thanks for the idea, I will look into that

  • @afara2000
    @afara2000 3 ปีที่แล้ว +2

    For reloading a Cisco IOS device, you'll need to hit "enter" or return key i.e., "
    " instead of 'y' in Ansible script. Although, 'y' may work but it's good to use proper commands.

  • @chrisdotbrown1
    @chrisdotbrown1 4 ปีที่แล้ว +1

    Great video - more network ansible please, especially the impact of ansible changes on routing tables

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      Hi Chris, can you expand on that requirement a bit more? Ansible changes on routing tables are basically somebody making changes. Are you looking to compare routing tables before and after a specific change?

    • @chrisdotbrown1
      @chrisdotbrown1 4 ปีที่แล้ว +1

      @@RogerPerkin the scenario would be if you wanted to change a route would you use the config module or command. Just trying to understand how smart the config module is.

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      I don’t think the Ansible config module is smart - it literally just performs the same command you would type on the CLI
      Are you looking for more of a predictive / changing routes based on certain network conditions?

    • @chrisdotbrown1
      @chrisdotbrown1 4 ปีที่แล้ว +1

      @@RogerPerkin Not really just trying to get me head around good operational practice and maintenance and which modules are best for what. I am thinking, facts and command to perform incremental change and test success and then config to ensure it hasn't been changed. I get that config can also best use for initial setup. I think one of my observations with Ansible is that there is a lot of content on how to do change but less on best practice. Great video - make really clear some key technics.

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +3

      @@chrisdotbrown1 Think of Ansible as a tool to make changes and config push / pulls in a predictive easy way. It's a great tool but if you want to get it to do clever stuff, you need to put clever config into it. Maybe you should look at Python and PYATS for something that will monitor your network for change and config drift. There is not one right tool for anything and there are so many ways of doing everything.

  • @mihaigrigore2136
    @mihaigrigore2136 4 ปีที่แล้ว +1

    Excellent video, Roger! Thank you for sharing.

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว

      Thanks, glad it helped.

  • @RohitPatil-qx9tf
    @RohitPatil-qx9tf 2 ปีที่แล้ว +2

    Hi Roger,
    I want to skip the upgrade if the current version and upgrade image are same.. But looks like it skip the debug message but start running other tasks.. ? Any inputs?

  • @peterly7381
    @peterly7381 3 ปีที่แล้ว +1

    Awesome and very intuitive video instruction. However, this is a router by router. If we we 10 routers at once, what's the best method? 10 separate session currently? or how would you do it in parallel? Thanks.

    • @RogerPerkin
      @RogerPerkin  3 ปีที่แล้ว +1

      Hi Peter, this playbook was just to explain the basic process. If you have 10 devices to upgrade it's up to you how you want to tackle it. If you added all your devices into the hosts file they would all upgrade at once, you may want to just do 10 at a time or if you wanted to do 1 at at time just wind the forks value back in ansible.cfg. The next device would not start until the previous play had finished. For production devices this playbook is really to take all the manual steps out of the process and some customers prefer to take things slowly over a day others are happy to fire all at once.

  • @hygri
    @hygri 4 ปีที่แล้ว +4

    Sweet tutorial Roger, much appreciated. Just a thought; could you sneak in a check to see if there is actually flash space available for the upgrade? I've been hit by that many a time :)

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      Great suggestion! I can add that in a later video - Make sure you subscribe to be alerted when it goes live

    • @hygri
      @hygri 4 ปีที่แล้ว +1

      @@RogerPerkin Nice! Most definitely - I have, as they say , "got the bell on" :)

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      @Mr.b I have not deleted any videos, this is the only one I have on Jinja Templates - th-cam.com/video/p0C90zIbe5s/w-d-xo.html - all my other Ansible videos are in this playlist - th-cam.com/video/hLhHZ_uju2Q/w-d-xo.html

  • @DarkSideDiving
    @DarkSideDiving 4 ปีที่แล้ว +2

    Very cool !!!

  • @suelee9346
    @suelee9346 4 ปีที่แล้ว +1

    Thanks for the Video! Roger.
    Positives:
    This is good for Network Engineers who enjoys breathing through one nostril due to Corona Virus.
    This is good for someone who does not want to write Python codes.
    Not so positive:
    Using Ansible is like running on only 4 cylinders on a V8 car.
    Python might byte you back later.
    Why not use both nostrils (Python) or fire up all 8 cylinders (Python)?

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +3

      I agree, Ansible is not the fastest way to do things but for IOS upgrades I have found it to be very reliable - which is more important for me!

  • @rochdiferjani6778
    @rochdiferjani6778 7 หลายเดือนก่อน

    dear Roger could you please make a training video about aruba switch !
    🥰

  • @AJ-jm6zp
    @AJ-jm6zp 3 ปีที่แล้ว +1

    awesome and very helpful :)
    subscribed for your great work.
    could you please share that ansible script please

    • @RogerPerkin
      @RogerPerkin  3 ปีที่แล้ว +1

      Sure, you can find it here - github.com/rogerperkin/network-programmability/blob/master/SCRIPTS/Ansible/ios-upgrade.yml

  • @koye290904
    @koye290904 3 ปีที่แล้ว +1

    Great video Roger! How long would you say the entire upgrade process took from running the yml file in ansible to the completion of the upgrade? I intend to run this in a prod environment on over 30 network devices.

  • @sbahb1396
    @sbahb1396 4 ปีที่แล้ว +1

    Awesome video! Thank you Roger. A small question, do you covert this kind of upgrade for wireless controller and ASA in your course on your website? If yes I am really interested.
    I am currently working on upgrading our infrastructure devices (switches, WLC, ASA) it would be nice if you could share how to perform this kind of tasks with Ansible.
    Please let me know.
    Thank you again for the great video!

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      Hi sbah B, thank you for the comment. My course really covers from zero knowledge to running some basic playbooks. Once you get up and running there are so many use cases it would be impossible to cover them all. The process is the same you just need to tweak the playbook for your specific hardware. It all depends on how many deivces you have. For me the switch playbook was really worth writing as you can easily upgrade 100's or 1000's of switches with ease. For ASA or WLC it just depends how many you have and how often you want to upgrade them

  • @jonathantx
    @jonathantx 6 หลายเดือนก่อน

    Is it possible to gather facts based on a wildcard? for example only on a given switch model?

  • @jclm1rt
    @jclm1rt 4 ปีที่แล้ว +1

    Very good video! Is it possible to do the same upgrade simultaneously on multiple switches?

    • @dhanasekar-uj2ch
      @dhanasekar-uj2ch 4 ปีที่แล้ว +1

      Yes it is possible

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +2

      Yes, this is the power of Ansible, you can limit the number of connections with forks in the ansible.cfg file I normally have it at 5 connections at a time, however it can be more. It's just up to you how many you want to have going at the same time. For switch upgrades I would normally have them going at a manageable number so you can monitor them. Some customers want all at once, others prefer one at a time.

  • @umakantjena5154
    @umakantjena5154 4 ปีที่แล้ว +1

    thanks Roger for this video.
    why I am getting this error .
    fatal: [R1]: FAILED! => {"changed": false, "msg": "path specified in src not found"}
    I tried ~ or / , file path correct but it just cant get it.

  • @packetsbulliespb3441
    @packetsbulliespb3441 ปีที่แล้ว

    Does Ansible copy the image to all members if we have a stack switch, or how does Ansible manage this?

  • @ankukumar-hi2jt
    @ankukumar-hi2jt 8 หลายเดือนก่อน

    Thanks @Roger Perkin for your video so lets suppose i have 100 devices to upgrade and i did them at once so how ansible knows which all devices are coming up and then do post validation as few devices can take more time then other

    • @RogerPerkin
      @RogerPerkin  8 หลายเดือนก่อน

      You would put a delay on the playbook before you run the validation, you would just have to put a sensible figure in i.e wait 10 minutes?

  • @dhanasekar-uj2ch
    @dhanasekar-uj2ch 4 ปีที่แล้ว +1

    Excellent video, one query can we pass the enable password and hoow to do that

    • @afara2000
      @afara2000 3 ปีที่แล้ว +1

      You need to have "become: yes" and "become_method: enable" variables set in playbook or "ansible_become=yes" and "ansible_become_method=enable" in 'hosts' file and set "ansible_become_password=xyz" in your 'hosts' or inventory file. You can also use "-K" in CLI when you run playbook, it'll prompt you to manually enter enable password.

  • @neogeoh1
    @neogeoh1 4 ปีที่แล้ว +1

    Sir... I Mount a python program to do this. I need this code to try it out. I will check your website otherwise please let me know where I can get it. I am new to Ansible and this will serve me as a great experiment. Thank you for sharing.

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +1

      Hi, I am working on this and will be putting a new video out soon performing the task using Python

  • @JoshepGomez123
    @JoshepGomez123 4 ปีที่แล้ว +1

    Ansible can be used to upgrade other Cisco OS (IOS-XR, IOS-XE, NXOS)? or is limited to IOS

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +2

      Yes, you can use it to upgrade other Cisco OS, it's just IOS is easiest. If you understand the manual process to upgrade NXOS then using Ansible is just taking the steps and translating them.

  • @deepak7057
    @deepak7057 3 ปีที่แล้ว +1

    cisco WS-C4948 not upgrade so plz help me

  • @feargalledwidge806
    @feargalledwidge806 4 ปีที่แล้ว +1

    Great video - but every time I try to replicate it - I get a failure in the net_put module. I get "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'changed' referenced before assignment fatal: [TEST]: FAILED! => {"msg": "Unexpected failure during module execution.", "stdout": ""}. Ansible version is 2.9.19.

    • @aydinkocak3270
      @aydinkocak3270 4 ปีที่แล้ว +1

      Hi I receive same error with centos but same playbook run without any error on ubuntu 20.04 LTS.

  • @jhonvinod8988
    @jhonvinod8988 4 ปีที่แล้ว +2

    Please upload iOS upgrade using python. Thank you

    • @RogerPerkin
      @RogerPerkin  4 ปีที่แล้ว +3

      Sure, that was going to be my next video, performing the same operation using Python! Hit subscribe and you will be notified as soon as it goes live!

  • @marcosdxdydz
    @marcosdxdydz 7 หลายเดือนก่อน

    lousy explanation

  • @ershadramezani6716
    @ershadramezani6716 ปีที่แล้ว +1

    Does anyone know why I'm getting this error with scp ?:
    fatal: [sw1-access]: FAILED! => {"changed": false, "destination": "flash:/test.txt", "msg": "Exception received: Error transferring file to flash:/test.txt: Initializing SCP session of remote file [flash:/test.txt] for write failed with error [b'Socket error: No such file or directory']"}
    Thanks in advance