Closed bob2build closed 5 years ago
you must use ansible delegate_to: 127.0.0.1
and/or connection=local
I didn't quite get how delegate_to: 127.0.0.1 works, I managed to make this work by creating a static file local_inventory.yaml in root directory
all:
hosts:
localhost:
connection: local
ansible_python_interpreter: /usr/bin/python
and passed raw_arguments: "--inventory-file=test/ansible/local_inventory.yaml" in kitchen.yml
Thanks for the info @ahelal. This plugin works great. I infact use kitchen-ansiblepush to upload cookbooks tar.gz file to remove servers and run chef-solo. It is counter intuitive, however, kitchen is really slow to converge cookbooks since it uploads 1 file at a time.
Hi @bob2build @ahelal Is this solution going to work with the internal inventory file that the plugin creates to connect to the created machine during converge?
@avishayil I only tried with localhost. However, I believe this should allow you to add additional hosts on top of existing hosts created by vagrant.
I'm working with kitchen ec2 driver, i'll try and let anyone know here in case someone else searches this. Thanks!
kitchen-ansible-inventory does not include localhost. So I am unable to run any commands on the controller node. Is there any configuration to add localhost name in the inventory?