How does your Vagrantfile looks? If you can came up with a command like that works.
ie sudo su - cd /vagrant/.chef su - -u <other user> <command> you could use a shell script to run your command. Alvaro. On Tue, Apr 19, 2016 at 8:51 AM, <[email protected]> wrote: > I am trying to provision a VM using the chef_client provisioner but it > tries to authenticate with my current username. I want to use another one > instead. In fact, I do not want to use the .chef folder inside the current > directory (in the same folder as the Vagrantfile), but instead use the one > in vagrant/.chef since the Chef server for Vagrant is different than the > production server. > > How do I do this? > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/vagrant/issues > IRC: #vagrant on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/vagrant-up/c27838cf-af5b-47c0-9109-ab5e22238ca9%40googlegroups.com > <https://groups.google.com/d/msgid/vagrant-up/c27838cf-af5b-47c0-9109-ab5e22238ca9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewONndwn-pgyHJaU%3DOsO3O1-5nhnxtnonM%3DrYz5jt8R3A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
