Run command on the Ansible host here Edit: You can avoid having to type connection: local in your play by adding this to your inventory: localhost ansible_connection=local Create ansible role from scratch | Ansible roles example here