When I use vagrant, I can specify the inventory file in the Vagrantfile.
Example:
config.vm.provision "ansible" do |ansible|
ansible.playbook = "my_folder/playbook.yml"
ansible.inventory_path = "my_folder/inventory_file"
end
How can I configure the inventory_file when I use packer?
I can't see any related info in the official documentation of packer:
http://www.packer.io/docs/provisioners/ansible-local.html
I need specify the inventory file, because, when I run my packer.json, this is the output:
digitalocean: Executing Ansible: ansible-playbook /tmp/my_folder/playbook.yml -c local -i "127.0.0.1,"
digitalocean:
digitalocean: PLAY [foo] ******************************************************************
digitalocean: skipping: no hosts matched
Packer seems using a inventory file named "127.0.0.1,", and I don't know why.
How can I specify my inventory file?
Thanks!