Re:An Ansible Tutorial
by dangerlibrary on Tuesday August 26, 2014 @12:15PM
(#8227953)
I love Ansible.
What's scary about shell scripts is the lack of idempotence (if you accidentally run them twice, things break).
What's annoying about chef/puppet is the bootstrapping overhead -- you can't start from a blank slate system, because you still need to install puppet-client or ruby+dependencies. So now you're paying to store a bunch of semi-pre-configured images with some out-of-date ruby gems or an old puppet-client. If you want to start from a blank image, then you're using shell scripts to install the toolchain that will let you avoid using shell scripts (or worse - doing it by hand!).
Ansible is idempotent ssh + shell scripting, so it solves the 'blank slate' problem nicely. It only requires python, which is bundled by default on ubuntu servers.
Re:An Ansible Tutorial
by fideloper on Tuesday August 26, 2014 @12:22PM
(#8228005)
That was well worded! I tried to say that in the article but didn't manage it as succinctly :D
Personally I love how it makes it easy to convert existing shell scripts. One of my projects is Vaprobash - vagrant provisioning bash scripts - which contains mostly non-idempotent scripts. (It uses bash scripts purposefully as a teaching tool). Making an ansible version of it will be nice as well.
Also, there's Rex now (in Perl), which, in my opinion, is better than Ansible as I hate writing code in YAML - I'd rather do it in Perl if Python/Go/Rust are not a option.
Re:An Ansible Tutorial
by dangerlibrary on Tuesday August 26, 2014 @03:30PM
(#8229016)
Stack looks cool, but I can't use it to repair a broken configuration. A commit log recording which commands have already run doesn't verify that the system is in the correct state.
Re:An Ansible Tutorial
by fideloper on Tuesday August 26, 2014 @11:39AM
(#8227709)
This weeks edition of Servers for Hackers goes from using ad-hoc commands (shell and other modules), to Playbooks and finally abstracting everything out to a Role with templates, files and variables.
Re:An Ansible Tutorial
by dyeje on Tuesday August 26, 2014 @11:57AM
(#8227822)
I clicked on this thinking it would be something involving the ansibles from the Ender's Game series which allow instant communication across large stretches of space. I should probably take my lunch soon.
What's scary about shell scripts is the lack of idempotence (if you accidentally run them twice, things break).
What's annoying about chef/puppet is the bootstrapping overhead -- you can't start from a blank slate system, because you still need to install puppet-client or ruby+dependencies. So now you're paying to store a bunch of semi-pre-configured images with some out-of-date ruby gems or an old puppet-client. If you want to start from a blank image, then you're using shell scripts to install the toolchain that will let you avoid using shell scripts (or worse - doing it by hand!).
Ansible is idempotent ssh + shell scripting, so it solves the 'blank slate' problem nicely. It only requires python, which is bundled by default on ubuntu servers.
Personally I love how it makes it easy to convert existing shell scripts. One of my projects is Vaprobash - vagrant provisioning bash scripts - which contains mostly non-idempotent scripts. (It uses bash scripts purposefully as a teaching tool). Making an ansible version of it will be nice as well.
Also, there's Rex now (in Perl), which, in my opinion, is better than Ansible as I hate writing code in YAML - I'd rather do it in Perl if Python/Go/Rust are not a option.