Nornir vs Ansible: Which Automation Tool Is Better?

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 32

  • @frankiefuryland
    @frankiefuryland 7 місяців тому +1

    As a fellow Scottish network engineer (Fae Glesga) it's good to hear you doing CBT nuggets and teaching others the massive benefits of network automation. Your vids on your channel have been so helpful, so thank you!

  • @MatheusAugustoDaSilva
    @MatheusAugustoDaSilva 2 роки тому +4

    One theme that I often see in beginner-level network automation tutorials using Ansible is that the configuration scenarios are very simplistic: let's create some VLANs! let's configure static routing! let's enable OSPF! For these simple cases Ansible works just fine.
    The thing is, when facing real-world network automation scenarios you'll often have to adapt your automation to existing requirements, and this will involve a lot of nested if statement logic. In Ansible, anyone that has tried to implement multiple conditionals knows it is a chore. Data processing is a chore in ansible, as you need to explicitly register variables via a task and you can't just iterate over data structures like lists and dictionaries as easily as you'd want. Model-driven programmability can become a nightmare in Ansible.
    The more complex your automation becomes and the more requirements you put into the mix, the more control you need of what actually happens on the network. Ansible is simply not made to accomodate that amount of control. Even if you make your own Ansible modules with some custom Python code, you're just hacking around a tool that was never meant to do network automation in the first place; Ansible was built for system admins. Nornir, on the other hand, was built for network automation engineers.

    • @thegtlab
      @thegtlab 2 роки тому

      Very well said.

  • @cruise2kx
    @cruise2kx 3 роки тому

    Excellent video. I really liked the trivia behind the terms.

  • @network_girl8388
    @network_girl8388 4 роки тому +1

    Thanks for the comparisons!

  • @fraserb151
    @fraserb151 3 роки тому

    Great content John, very useful. Keep posting these helpful videos 👍

  • @ganesh634
    @ganesh634 4 роки тому +4

    Ansible is a tool that is written in Python and easily extensible by writing custom Ansible plugins which are basically Python files. Writing reusable custom Ansible plugins can avoid complex playbooks and abstract the code implementation from users.

    • @IPvZero
      @IPvZero 4 роки тому +5

      Hey Ganesh, I agree. You can certainly write your own Ansible modules and this is certainly fine to do here and there, if you have the Python skills to do so. However, if you're having to resort to writing Python code to get around the barriers you're running into using Ansible, then in my opinion, you're probably going to be better served just using Nornir and enjoying the full flexibility and performance that it offers :)

    • @ganesh634
      @ganesh634 4 роки тому +2

      IPvZero The point I wanted to make is you can learn python by using Ansible as well. I would say writing Ansible plugins is a smart way to solve problems by taming the tool :). While Ansible ecosystem can be tuned to achieve greater performance the main strength lies in ease of usability and maintainability as after automation is done most likely a person won't be sitting in front of system watching daily automation task run. I have used ssh based libraries in past for writing custom automation scripts but in my experience in the long run the maintenance overhead results in diminishing returns. Having said all of the above the best approach would be to understand the capabilities of available tools and pick the one that best fits a given environment :)

    • @IPvZero
      @IPvZero 4 роки тому +4

      @@ganesh634 I definitely agree. Ultimately my position is both are very useful tools, and neither makes the other obsolete. As you say, pick the tool that's best for your environment! :)

    • @afara2000
      @afara2000 2 роки тому

      @@IPvZero Hi, Does Nornir have vault feature like Ansible to encrypt variables such as usernames/password/etc? If not, can it be integrated with Ansible Vault? Thanks.

    • @IPvZero
      @IPvZero 2 роки тому +1

      @@afara2000 You can use Ansible vault with Nornir, as best I am aware. Probably the best solution would be using Hashicorp Vault, though! :)

  • @aspathprepend4477
    @aspathprepend4477 3 роки тому

    Finally i can associate a face to the voice of the instructor that made me love nornir!!

  • @kabazulkifil158
    @kabazulkifil158 4 роки тому +1

    Great video. Python is the way to go in network automation. We have to learn it.

    • @IPvZero
      @IPvZero 4 роки тому

      Thanks Kaba! I definitely agree with you. Learning Python is a huge plus for network automation. Opens up so many possibilities!

  • @user-v2u-c2j
    @user-v2u-c2j Рік тому

    ^john thank you

  • @dcentvlog
    @dcentvlog 2 роки тому

    Great explanation

  • @jairusan
    @jairusan 4 роки тому +1

    Very useful comparison John, thank you very much, I still feel much inclined to continue learning python3 therefore, Nornir is the way I choose. Looking forward to continuing to learn with you. Until the next skill, Take care!

    • @IPvZero
      @IPvZero 4 роки тому +1

      Thanks, Jair! Yup, I definitely agree. I think if you're interested in learning Python then Nornir is a great way to go. That said, I always make sure that I keep labbing Ansible since it's pretty much an essential in the current landscape and you're very likely gonna bump into it in the real world, either in production or answering exam questions :)
      Speak soon!
      -John

    • @jairusan
      @jairusan 4 роки тому +1

      @@IPvZero great point! Thanks again, for all the great work you do.

    • @IPvZero
      @IPvZero 4 роки тому +1

      @@jairusan Thanks Jair! :)

    • @Nikoolayy1
      @Nikoolayy1 3 роки тому

      Ansible is also python :) If you want to write modules on Ansible you use Python.

  • @danielvalente2042
    @danielvalente2042 4 роки тому +3

    Let me add a fourth reason to Ansible :), it is on the DevNet Associate content

    • @IPvZero
      @IPvZero 4 роки тому +2

      Absolutely agree, Daniel! And on the DevNet Professional too!
      :)
      -John

  • @lilianacarmen7915
    @lilianacarmen7915 4 роки тому +1

    Hi all! Is it possible to use Ansible modules with Nornir? Thanks!

    • @IPvZero
      @IPvZero 4 роки тому

      Hey, Liliana. Ansible modules are tailored for that framework. However, the same type of logic you would write for an Ansible module - Python - is using natively within Nornir. So if you're comfortable with language you can just go straight to Nornir and write any Python logic you wish to achieve whatever task you want directly within the framework :)
      -John

  • @ParthPatel-jn6io
    @ParthPatel-jn6io 3 роки тому

    Good comparison. But What about idempotency of nornir ? I knew ansible has idempotency nature.

    • @cbtnuggets
      @cbtnuggets  3 роки тому

      Thanks for your question, Parth!
      Nornir in some of the early iterations, wasn't idempotency, but more things were introduced like Napalm and IP Fabric. The IP Fabric can be used for the network discovery and inventory and the rest can apply the configurations. We've heard of other ways of making this work and frankly, more and more plugins/improvements are being made to Nornir. This will largely also depend on how you write your scripts.
      We hope this is helpful for you, thank you for learning with us!

  • @randyrozo
    @randyrozo 2 роки тому

    The best

  • @chiyupao5497
    @chiyupao5497 3 роки тому

    我全都要