Ansible can be used as a distributed command runner but it's also a configuration management tool like Puppet (and much more).
Its "playbooks" are by default meant to be idempotent -- you can run them over and over ensuring that a system is in a consistent state.