PyInfra 3.8.0
31–40 of 110 posts
Re: PyInfra 3.8.0
#32This reminds me of Nortel Command Console back in 2000-2005! I worked for a telco company that had a lot of Nortel Passport devices (does anyone know what Frame Relay is?). We started changing the network from Nortel to Cisco. Cisco used telnet (later SSH), but Nortel people were extremelly reluctant to switch. Turns out the Nortel network managment system (nortel nms) had a very interesting feature: you could open t…
Re: PyInfra 3.8.0
#33Has anyone used this and ansible and is able to give a short comparison with likes and dislikes?
I switched from Ansible to Pyinfra for my homelab, and continue to use Ansible at work. The biggest difference is that Pyinfra is simply Python code. It's incredibly easy to control the system in whatever manner you need to. You can probably do the same thing in Ansible, but it's never quite as obvious how to do it. This also means it's much more clear where and why things work the way they do in Pyinfra, where in An…
Incredibly frustrating that the data you want is right there but you can't easily grab it.
Re: PyInfra 3.8.0
#34Has anyone used this and ansible and is able to give a short comparison with likes and dislikes?
Switched to Pyinfra and the difference is day and night. You write python code you can organise your stuff into functions, classes and whatever you like and then instantiate them as you like. Highly reusable configuration.
You have full pwoer such as you can call boto to fetch the list of servers to target, filter base on tags and what not. Only sky is the limit because it is NOT a DSL (or YAML) rather full blow real python.
Re: PyInfra 3.8.0
#35Earlier quoted context omitted.
I switched from Ansible to Pyinfra for my homelab, and continue to use Ansible at work. The biggest difference is that Pyinfra is simply Python code. It's incredibly easy to control the system in whatever manner you need to. You can probably do the same thing in Ansible, but it's never quite as obvious how to do it. This also means it's much more clear where and why things work the way they do in Pyinfra, where in An…
The worst part of Ansible is data manipulation, what would be an easy dictionary operation in Python is a huge mix of lookups in Ansible. Incredibly frustrating that the data you want is right there but you can't easily grab it.
Re: PyInfra 3.8.0
#36I despise YAML, but I can appreciate that it makes it harder to introduce imperative logic, and it forces you to stay on the paved path - which is very well-tested.
Re: PyInfra 3.8.0
#37Re: PyInfra 3.8.0
#38Earlier quoted context omitted.
The worst part of Ansible is data manipulation, what would be an easy dictionary operation in Python is a huge mix of lookups in Ansible. Incredibly frustrating that the data you want is right there but you can't easily grab it.
If Jinja templating for data manipulation gets too complex or inconvenient, you can create your own module in ansible and use python code for data manipulation. But at this point you are better served with plain python which I think is where pyinfra should shine. I want to take a look though at how hard it is to implement your own module for it.
If you're doing data manipulation locally you would simply write Python code.
Operations[1] are Python functions which execute (yield) commands which will be run on hosts.
That's the gist of what it takes to write custom modules for Pyinfra.
[0] https://docs.pyinfra.com/en/3.x/api/facts.html [1] https://docs.pyinfra.com/en/3.x/api/operations.html
Re: PyInfra 3.8.0
#39Earlier quoted context omitted.
This is spam - btw this is the first spam I have ever come across on hacker news
FWIW, if you turn on "showdead", there is a ton of spam on HN. The mods are just really good.
Re: PyInfra 3.8.0
#40“Built on Python, Salt is an event-driven automation tool and framework to deploy, configure, and manage complex IT systems. Use Salt to automate common infrastructure administration tasks and ensure that all the components of your infrastructure are operating in a consistent desired state.”
https://docs.saltproject.io/en/latest/topics/about_salt_proj...