ansible all -i ./ansible_hosts -m command -a "cat /etc/issue"
From there I started going trough the possible options I could pass instead of each time doing a command, such as checking the network speed using a script etc..As it might be useful for some I have next aliases set:
export ANSIBLE_PATH="$HOME/web/clusters-servers/mycluster"
alias a="ansible -i $ANSIBLE_PATH/hosts"
alias ap="ansible-playbook -i $ANSIBLE_PATH/hosts"
# for vagrant testing machines where I test playbooks before deploying
alias atest="ansible -i $ANSIBLE_PATH/vagrant/hosts --private-key=~/.vagrant.d/insecure_private_key -u vagrant -s"
alias aptest="ansible-playbook -i $ANSIBLE_PATH/vagrant/hosts --private-key=~/.vagrant.d/insecure_private_key -u vagrant -s"
On of the (slightly) annoying things is after bringing up a new node you have to "bootstrap" the node so you can issue ansible commands on it, I have a simple script [1] for doing so but I'd love to hear how others do it!