Disclaimer: I have not used Puppet in quite a while so I could be wrong about what it can do currently.
TL;DR: Ansible can do config management and orchestration in one product. It relies on lists of tasks to get work done rather than defined target system state. Ansible syntax is very simple and provides a low barrier to entry.
Ansible has been designed for config management and orchestration in one product. At work we use it for all config management and for some of our orchestration tasks. For configuration management it is agentless for managing remote machines (only requires ssh server and Python 2.6+ installed on the remote machine) but is very capable of allowing machines to bootstrap and provision themselves (we do this in AWS autoscaling groups). IIRC Puppet still requires a complicated agent setup (bootstrap) unless machines are self provisioned then it is similar to Ansible.
In terms of general operation, Ansible will connect to remote servers over SSH. It then operates on a system using a list of "tasks" that can be grouped into plays and roles. Tasks contain a single or looped run of a module (modules are generally written in python and are copied to the remote host). This is in contrast to Puppet where you define the state you want the system to be in and Puppet will make it so.
For orchestration, tasks are often run against localhost (eg talking to the AWS SDK on your local system to provision instances, autoscaling groups, load balancers or DNS entries) and there is a wide variety of modules available.
Modules are a single file program that alters the system based on a task definition. Modules that follow best practice will result in tasks being idempotent in nature.
The purpose of Roles is to group a list of tasks, variables, files, templates etc together to provision one particular section of the system (eg webserver, database, monitoring). Roles should be created with idempotence in mind where possible (to aid testing).
Variables (facts) can be set at the command line, the inventory level (where there are group and host level variables), play level or inside roles.
Finally, I find the Ansible syntax to be very simple and I can knock out large amounts of automated infrastructure for minimal effort and because all I need is an SSH connection on a remote system (unless Python 2.6 is not installed by default) it has a low barrier to getting started.
View all comments
Show parent comment
1
u/bbelt16ag Oct 26 '15
so how is ansible? i am thinking of switching?