a blog by Marius Gedminas

Posts tagged Ansible

Ansible is great

I haven’t used configuration management tools in a very long time because I didn’t know which tool to pick (Chef? Puppet? Ansible? Salt? cfengine?). Now I use Ansible and am very happy with it. Here’s how you start – with an empty git repository: $ mkdir my-infra $ cd my-infra $ git init . Let’s start by making sure a couple of Ubuntu servers will have unattended upgrades enabled. First we tell Ansible what the servers are $ vim hosts $ cat hosts debesis ranka Let’s make sure Ansible can ssh to those hosts: $ ansible -i hosts all -m ping ranka | SUCCESS => { "changed": false, "ping": "pong" } debesis | SUCCESS => { "changed": false, "ping": "pong" } I’ve an ~/.ssh/config that expands these nicknames to the full hostnames, and I’ve a private SSH key that allows me access without providing my password every time.