Notice! This post is more than a year old. It may be outdated.
I have a playbook which will be run on the Ansible host.
Running the play from the command line using
ansible-playbook I got the result that I expected. But when I use Vagrant to provision a virtual machine using Ansible provisioner, the play that should have been executed on the Ansible host was skipped altogether.
From what I understand, this is caused by Vagrant Ansible provisioner always setting the
--limit argument. I can reproduce the same issue by executing the playbook using
ansible-playbook and setting the
--limit argument explicitly.
Vagrantfile add the following line to your Ansible provisioner configuration