4 ms·
To the author: I know that TFA includes Ansible in its list of crazy tools, but after reading the list of complaints I think Ansible is actually more or less wh
by smacktoward 10y ago
To the author: I know that TFA includes Ansible in its list of crazy tools, but after reading the list of complaints I think Ansible is actually more or less what you're looking for.
- Ansible needs no centralized server.
- Ansible does everything over SSH, so you don't need to install client software on all your machines.
- Ansible can be configured to fail loudly when it fails ("ansible -vvvv"), so if a task you specify doesn't work it's generally not hard to figure out why.
- YAML as used in Ansible isn't really a DSL; it's just used to produce a very human-readable text recipe for bootstrapping a system. You can complicate things beyond that if you want to, but by default you're just specifying a list of tasks to be run on the target machine serially. You don't have to learn a programming language like Ruby to be productive with it.
- Ansible has a bunch of modules to make things like creating users, setting up popular applications, etc. easy, but if you want to you can ignore all that and just specify each task in your "playbook" as a shell command. So if you can provision a machine by hand from the shell, all you need to do to write a functioning Ansible playbook is learn a little YAML syntax and Ansible's "shell" and "command" modules.
- Vagrant supports Ansible as a provisioner, so if you want to do local testing you can pick up your Ansible playbook and feed it to Vagrant to produce a local VirtualBox VM configured to your specifications. Then once it's working you can use the same playbook to configure your remote machine(s).
I resisted configuration management when the choices were Chef and Puppet for many of the same reasons articulated in the post; they were heavyweight, complicated solutions designed for large-scale use. Ansible removed all my complaints. It's easy to pick up, requires very little software, and when making design decisions generally goes with the simplest thing that could possibly work.
- hnarayanan 10y agoI tend to agree with you completely and came here to essentially say what you've said above so I won't repeat it. The only place where my opinion diverges is ansible -vvvv. The output is so horrendously verbose and yet it's so dense that I always struggle to pinpoint the root cause of the problem.
- dozzie 10y ago> - Ansible needs no centralized server. No, but it requires the same centralization on a different level: SSH key. Good luck migrating to another one once a need arises (e.g. one of the sysadmin leaves). > - Ansible does everything over SSH, so you don't need to install client software on all your machines. Once you start configuring SSH, you risk cutting off your debugging channel. Also, you wouldn't put your database connection management in user session handling code in your application, would you? So why mixing two totally separate things in one service? > - YAML as used in Ansible isn't really a DSL [...] You don't have to learn a programming language like Ruby to be productive with it. We've all seen how this was claimed for XSLT: "it's not code! it's human-readable! you don't need to learn anything beside XML!". It didn't end pretty. Why YAML-encoded programming language would be any different? Ansible is not a configuration management tool. Its very architecture (push-based SSH+sudo shell commands) sucks heavily for this task, even if you only have a dozen servers. It was never designed to keep OS state as encoded in intents. Ansible is just a tool that somebody hacked for their specific deployment case and then advertised as a general-purpose tool.
- paulryanrogers 10y ago> by default you're just specifying a list of tasks to be run on the target machine serially. You don't have to learn a programming language like Ruby to be productive with it. Actually it feels like functional programming to me. It seems to discourage dependencies by continuing (other steps) after failures unless explicitly skipped.