3 ms·
Do you have any suggestions on good set of sdk or library for writing those automations in python? The main reason for using ansible for me was always because o
by dialogbox 5y ago
Do you have any suggestions on good set of sdk or library for writing those automations in python? The main reason for using ansible for me was always because of their rich built in tasks.
I tried writing in python my automations but even very simple tasks were needed too much effort compare to ansible so I had to return back.
- outworlder 5y agoNowhere near as complete as Ansible or even in the same space, but helps to write remote SSH automations: https://www.fabfile.org/ https://www.fabfile.org/
- gizdan 5y agoI wouldn't. I said that as a point the ansible is bad. It is procedural and hard to follow. Bash and python don't have any host management features (I.e. inventories) so you'd have implement that yourself, which won't be easy. I suggest looking into the alternative, such as chef, puppet, saltstack etc. They allow for declarative configurations and make it a lot easier to make your configurations idempotent. On top of that, do the infrastructure itself (aws, gcp etc) in terraform (or pulumi if you want it in a programming language). Terraform has its issues, but it is certainly a lot better at managing infrastructure than ansible.
- chousuke 5y agoAnsible and Puppet are tools that do very different things. I mostly agree with you, but Ansible does work decently as an orchestrator. You want to use tools like Puppet and Terraform to define the state of your systems, and Ansible to run operations on those systems, because not everything is stateless; trying to upgrade a database with Puppet or Terraform will be painful, but Ansible won't have trouble. I do wish it had static typing (Puppet took 4 major releases to finally get it and its type system is its best feature over alternatives) and less YAML, but it is what it is...
- shaicoleman 5y agoGive pyinfra a try https://github.com/Fizzadar/pyinfra https://github.com/Fizzadar/pyinfra
- mianos 5y agoSaltstack. It is super easy to write your own python modules and everything else, such as a transport, module distribution, delivery from git and management, is already there for you.