3 ms·
I was about to make the point about Ansible but I guess you've already made it in the README.
by benbristow 9y ago
I was about to make the point about Ansible but I guess you've already made it in the README.
- giobox 9y agoIs Ansible really too much though, as the author suggests in README for simple tasks? If all you want is basic "SSH to a server, install some packages" type behavior, I'd still make the argument Ansible is simpler than this. Ansible isn't like Chef/other competitors where you have to bootstrap or install a client on the target machine. IIRC it only really needs SSH access and a Python installation present on the target machine, which is basically most Linux distros. Looking at how you use this thing, I'm really not sure it would save me any time versus using Ansible.
- marmaduke 9y agoThere's also a learning curve case to be made against Ansible: if you've spent years polishing your Bash and coreutils one liners, you start over at zero when switching to Ansible. Ansible is also declarative (in principle) while shell scripts are imperative, which is a bit of mind bender. Then, when you debug, you have to understand that Ansible is implemented by imperative code.
- zandor 9y agoThe same could be said for some NIH tool. Bringing people up to speed on in-house tools can be a major hassle. Never mind the fact that popular tools like Ansible are battle-tested and most likely has more documentations and tutorials.
- marmaduke 9y agothe link here was for a tool using just SSH and Bash..?
- pchm 9y agoAuthor here. It's just a matter of personal preference. If you're proficient with Ansible then I'm sure you can achieve the same task even quicker. But to me, shell scripts are a more natural & faster way to get going for single-server setups and I always have a hard time with Ansible yaml syntax. Ansible has some undisputed advantages (e.g. idempotence) and if I had to recommend Ansible vs my approach, I'd always recommend Ansible. But for my personal needs (single-server rails apps), I prefer shell scripts.
- X-Istence 9y ago> IIRC it only really needs SSH access and a Python installation present on the target machine Which for my FreeBSD machines I have to run some bootstrap code that installs Python on it before I can run ansible against it. Would be nice if salt-ssh or ansible allowed me to have some bootstrap code that ran if Python didn't exist on the target machine.
- icebraining 9y agohttp://docs.ansible.com/ansible/raw_module.html http://docs.ansible.com/ansible/raw_module.html http://docs.ansible.com/ansible/script_module.html http://docs.ansible.com/ansible/script_module.html
- vacri 9y agoFor small deployments, this kind of thing means One Less Thing To Understand. I like and use Ansible, but there is a mild learning curve and the occasional gotcha. Given you generally have to know what you're trying to achieve in shell anyway, the shell versions are simpler, if less robust. For example, sudo apt update && sudo apt install nginx is easier than become: True tasks: - name: install nginx for great justice apt: name: nginx update_cache: yes state: latest There are also some edge cases where shell is better than ansible; some parameters are missing from some modules, meaning shell is more flexible; or if you want to read a command's STDOUT, it's a pain in Ansible.
- deleted 9y ago[deleted]