Installing ansible
# Official PPA for Ubuntu
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
Playbooks meant to only be run locally
or specify hosts: all:
and then invoke ansible with:
ansible-playbook -i 'localhost,' -c local Playbook.ansible.yml
Disable SSH host key checking
Export ANSIBLE_HOST_KEY_CHECKING before running ansible:
ANSIBLE_HOST_KEY_CHECKING=False ansible -i inventory.yml all -m ping
or into ansible.cfg put:
[defaults] host_key_checking = False
Async/parallelizing tasks
See http://toroid.org/ansible-parallel-dispatch and https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html, and https://blog.crisp.se/2018/01/27/maxwenzin/how-to-run-ansible-tasks-in-parallel, needs more research.
Tips & tricks
Good articles