Vagrant.configure(2) do |c|
c.vm.box = 'bento/centos'
c.vm.provision :chef_client do |chef|
chef.chef_server_url = 'https://chef.example.com/organizations/foobar'
chef.validation_key_path = 'vagrant/.chef/validator.pem'
chef.add_role 'web'
end
end
On Monday, April 18, 2016 at 10:55:46 PM UTC+2, Alvaro Miranda Aguilera
wrote:
>
> 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] <javascript:>>
> 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] <javascript:>.
>> 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/0ea0d69b-0bbc-4960-8e75-28c2fab78729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.