Ansible Base 2.10 is not supported by Red Hat?

Hi All,

We are trying to evaluate Ansible vs Nornir.

I found this update which says Ansible Base 2.10 is not supported by Red Hat, nor are there plans to package or release it to official downstream Red Hat distribution mechanisms such as the Customer Portal/CDN. Ansible customers are free to use the community version of Ansible Base for testing or development purposes, or self-supported environments.

Can someone please clarify if there is any update on plans, and if so where do I see this information?

Also, please share your experience on Nornir. I see there is not a large community so far for Nornir as Ansible. But I’m sure some of you must have tried Nornir. If so, are you using it in production?

Thanks
Raj

Hi Raj

disclaimer: I work for Red Hat, but this is not an official support statement.

Your base 2.10 statement you quote refers to upstream community Ansible.

Red Hat only provides support through an Ansible Automation Platform subscription. This is the downstream enterprise supported software. That will include support for 2.10 at a future date through the AAP sub.

As for Nornir…
Never heard of it before, and never had a customer asking about it before. That doesn’t infer good or bad.

From https://nornir.readthedocs.io/en/latest/ this stood out to me:
Nornir is an automation framework written in python to be used with python.

Nornir aims to solve those problems by providing a pure python framework

…and will provide a common framework to write “plugins”

So basically it’s inventing the wheel and writing code. This is exactly what Ansible was written to avoid and address. This is why there is circa 4500 modules already out there so you don’t have to write code!

I hope that helps.

Phil.

Thank you Phil for the clarification.

A follow up question:
I read in one of the blogs that under the hood, Ansible uses NAPALAM with which Ansible abstracts things to the developer so they can convey their intent in a declarative manner, which is awesome and Ansible does the heavy lifting.

But when going through the abstraction layer vs directly calling the vendor neutral library, there seems to be a speed improvement with Nornir as it calls this lib directly. Now this might show some dividends when connected to 100s of devices to get facts.

What are some of the ways to achieve this speed improvement in Ansible which I would like to try? Would be great if there is a blog or site someone tried and can share. I’m using the Ansible 2.9.x version.

For example: I used accelerate=true but this didn’t work as the play said it was invalid

Thank you,

Raj

Hi Raj

Did you mean NAPALM? It seems to do want you’re talking about. I don’t know if any element of that is used under the covers tbh. There are napalm modules of course available for Ansible :slight_smile:

But what it does has already been engineered into the network module refactoring which is a recent enhancement.
Check out this blog for more details, but it sounds like it does what you’re after and you’re mostly interested in the network side of things: https://www.ansible.com/blog/network-features-coming-soon-in-ansible-engine-2.9 [check out the Facts Enhancements section in particular]

There are ways to enhance speed with Ansible, but there are normally trade offs. I have to ask why you need speed? Most people want to run things fast but when I ask why they don’t really have an answer!

Yes doing things in direct code is probably going to be faster, but for me, ease of use, simplicity and consistently for much more important.

It sounds like you’re still thinking about coding rather than infrastructure-as-code.

Sorry I have no idea what you mean by accelerate=true

Phil.

Hi Phil,

Thanks again for your explanation. Sorry for the misspelling, yes you are right that it’s NAPALM.

In regards to accelerate, here is the info which when tried to enable didn’t work - https://docs.ansible.com/ansible/2.3/playbooks_acceleration.html

I’m not thinking about coding but would like to use the power of Ansible to do the heavy lifting, but the exercise I’m going through is to ensure we are weighing and evaluating all the features, including performance, reliability, consistency, community support and few things you already mentioned.

You ask a good question - Why speed? If I may put it in a use case way: Say I have a UI, which provides a single glass pane of all devices in my Data Center, and you could also extend a case where I have multiple DC’s in a region. I have other UI elements that would render based on some business logic, which would be dependent on the facts or data I gather from these devices. In this case if the user is going to wait for 3 to 5 minutes or more compared to Nornir getting the data in seconds, would you see this as what does it matter? To put this in a different view, for example, you are opening up your Gmail - it takes 3 to 5 minutes to open your inbox to read your data, and then do the necessary operations you would want to do, then what would you say to this case?

Thank you,
Raj

In regards to accelerate, here is the info which when tried to enable didn’t work - https://docs.ansible.com/ansible/2.3/playbooks_acceleration.html
So ansible 2.3 is way old, please refer to the latest docs that match your version. This was replaced by SSH pipelining, which may not be applicable to your networking devices. There are other network connection plugins though to make that part easy. BTW, how do you do these connections with Nornir? How does it discover new hosts and connect to them automatically? How does it know a network device is no longer online or has been decommissioned?

On the performance side, ansible is not going to take that long to get facts. Have you tried it? It sounds like you have been fed some FUD.

I’d suggest taking a rounded assessment to your overall automation needs, which is sounds like you’ve got in hand.

"I’m not thinking about coding " I’m afraid you are if you select the wrong automation.

When I hear the words like “business logic” I get worried, as this is going way beyond what the most successful automation tries to do. Keep it simple, consistent and reliable.

Once you’ve done your assessment, I’d love to hear how it panned out!

Thanks for clarifying in regards to pipelining and accelerate replacement.

You are right that there is general FUD around but none consumed, hence these queries to understand.

I’m not sure what Nornir does in regards to the questions you asked. I could guess by taking a shot - one has to wire lots of code and use NAPALM. But I don’t think Ansible can do event driven or has any notification mechanism to say a device is decommissioned so don’t push any configs or take the right action - does it?

In regards to the timings, a test was done. To get facts from 300 devices, Nornir took 20 seconds, where as Ansible took, rounding to 4 minutes. Added 100 forks and strategy - free, this timing came down to around 2 minutes 30 seconds. I plan to explore more options from the fact enhancements section you sent.

Thanks

Raj

But I don’t think Ansible can do event driven or has any notification mechanism to say a device is decommissioned so don’t push any configs or take the right action - does it?

You’re getting into platform functions generally now, so AWX/tower territory. Those have webhook capabilities and notification mechanisms.
You can use dynamic inventories either from the CLI or platform to auto discover targets and filter based on powerstate etc

Will check them out. Thanks Phil

Raj