Open walterdolce opened 4 years ago
In order to overcome the above, I had to do the following, which less than ideal 😅 :
# kitchen.yml
---
lifecycle:
pre_converge:
- local: |
sed -i '' "s/port: '.*'/port: '4443'/g" .kitchen/${KITCHEN_INSTANCE_NAME}.yml
driver:
name: vagrant
network:
- ["forwarded_port", {guest: 444, host: 444, auto_correct: true}]
Probably relates to test-kitchen/test-kitchen#1159
I have the following scenario at play:
22
disabled but still have the SSH daemon listening on another arbitrary port, say444
kitchen create
the VM just fine. Thekitchen-vagrant
driver will use port forwarding22 => 2222
as per default behaviour.kitchen converge
the VM just fine over port22 => 2222
. This is where Ansible (or any other provisioner) would configure the SSH daemon inside the VM to not listen on port22
anymore but listen on port444
as mentioned above.22 => 2222
default port-forwarding would no longer work. The SSH daemon inside the VM is listening on port444
after its first provisioning.How can I tell
kitchen-vagrant
to connect to the VM via port444
?So far I have tried using the following, either in combination or in isolation, but none of them have worked:
I would expect that if I modify the port settings of the driver, instead of seeing the following:
I would see the following:
But that doesn't happen. It's probably also worth mentioning that the automatically generated "test-kitchen state" (I think it's called..) remains the same all the time:
But I would expect to see
port: 444
. That doesn't happen either.What am I missing?
Thanks!