5 ms·
Using Ansible Galaxy
- HeyImAlex 13y agoI've been playing around with galaxy all this week, already there's a ton of cool stuff. Ansible kind of sits between imperative and declarative, which gives a lot of flexibility in how you merge together tasks to ultimately become idempotent. Finding just the right combination of commands is an art (I've seen some hacky playbooks), so having a way to grab something already built (and usually pretty polished) is awesome. I kind of think of ansible as a language in itself. You're given these tools, basic declarative and imperative functions to execute on your system, conditionals, loops, variables, and from these things you build idempotent super-functions called roles. Galaxy is just package management for ansible libraries. It's definitely not perfect (I'm not really in love with the way roles are laid out, a lot of boilerplate), and honestly I think something even more language like would be even better, but ansible is the best thing I've used so far.
- mpdehaan2 13y agoOne cool thing you can do with ansible-galaxy's CLI is initialize a role, so this may help, even if you aren't using Galaxy. ansible-galaxy init roles/rolename This will create the skeleton structure and stub out some of the basics.
- dmourati 13y agoHacking nonstop on ansible.
- gcb0 13y agoSo it install packages. Does it do a better job of handling configuration than the native package manager at least?
- geerlingguy 13y agoYes; if you open up one of the roles downloaded (like the solr role), you can see some of the niceties offered. The blog post basically covers one small aspect of Ansible—the ability to manage packages and simple configuration easily, but deployments, broad CM pushes (e.g. pushing the config out to 10s or 100s of servers concurrently), and broader orchestration ala Fabric isn't mentioned at all.
- vivab0rg 13y agoAnsible Galaxy is just Ansible roles extracted into their own Git repos. Which, I think, is a better solution to sharing and reusing tasks than playbooks. It's really a simple but powerful idea, I hope it catches on, because it can really make Ansible usage more "social".
- volume 13y agothis reminds me of index.docker.io and vagrant boxes ... do they have their own social/sharing thing too? Maybe someone needs to me a meta sharing thing for all this, for fun. geerlingguy: you should make another post that let's you provision puppet/chef/salt or cfengine3 via ansible :) I think that would be cool and generate even more attention to how cool ansible is. I'm going to play this this later today it looks intriguing.
- geerlingguy 13y agoI haven't thought about that; I'll work on either puppet or salt soon, and add a role. Things will get quite meta :)