.kitchen.yml SSH Username Setting?


#1

Hi there, I’m new to Chef and trying to figure out how to modify my .kitchen.yml file to change the SSH username for my vagrant box. I can’t seem to find the right Google words to figure it out.

Thanks for the help!


#2

You can use the “transport” section like this. We should probably add this to the FAQ /cc @robbkidd @cheeseplus


#3

That was fast, thank you!


#4

I spoke too soon, the configuration example doesn’t seem to work for me. Here’s the relevant part of my .kitchen.yml

driver:
  name: vagrant
  provider: virtualbox
transport:
  username: admin

And I’m still getting this output when I run kitchen converge

==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2201
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...

I checked the generated Vagrantfile in the .kitchen/kitchen-vagrant/ directory and can confirm that the config.ssh.username setting is not getting set. Does my .kitchen.yml look correct? Or am I missing something else?

Thanks again!


#5

What version of ChefDK/Test-Kitchen are you using?


#6
~/D/o/packer git:master ❯❯❯ chef -v                                                                                                ✱ ◼
Chef Development Kit Version: 0.13.21
chef-client version: 12.9.41
berks version: 4.3.2
kitchen version: 1.7.3

#7

Can I see more of your .kitchen.yml ? That should work…


#8

Actually, I just figured it out. I had to do this

platforms:
  - name: osx-10.10.5
    driver:
      box: osx-10.10.5
      username: admin