5 ms·
An Ansible Tutorial
- fideloper 12y agoThis 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.
- dyeje 12y agoI 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.
- fideloper 12y agoThat would be awesome, but sadly I haven't figured out beating the speed of light for intra-galactic communication.
- mcguire 12y agoForget intr-galactic communication, we need c+ to talk to the bleedin' cluster.
- steanne 12y agothat word predates card's usage; i think it was le guin. ..but yes, i do the same thing every time there's a heading that mentions it.
- glomph 12y agoYeah it is a key plot device in quite a few of Ursula Le Guin books. Pretty sure Card even gives credit in the appendix of one of his books.
- dangerlibrary 12y agoI 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.
- fideloper 12y agoThat 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.
- marcoamorales 12y agoI'm not sure what bootstrapping overhead you're talking about. You can do a knife bootstrap to bootstrap nodes, not sure about puppet.
- dangerlibrary 12y agoI didn't say it was difficult, I said it was annoying. The bootstrapping step isn't just easier when using Ansible, it doesn't exist.
- ciupicri 12y agoCome one, it's not that hard to do a yum install puppet or use cobbler for provisioning and install puppet along with the OS.
- 12y ago