if you are using packer with vagrant provider, is expected the box will be
ssh and ready to use

usually will have a vagrant user with the vagrant known ssh

so vagrant can ssh.

on first boot, vagrant will insert a new ssh cred.

you can see what ssh will be used with

vagrant ssh-config



you could avoid change of the ssh key with config.ssh.insert_key = false

https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html#config-ssh-insert_key


you can read more here
https://www.vagrantup.com/docs/boxes/base.html#quot-vagrant-quot-user

alvaro.

On Fri, Sep 27, 2019 at 9:13 PM John Patrick <[email protected]> wrote:

> I'm trying to use packer to boot a vagrant box, execute some ansible
> playbooks/tasks and then export the vagrant box.
> I raised an issue/question with packer
> https://github.com/hashicorp/packer/issues/8148 and was told to configure
> the password for ansible to use. But vagrant achieves passwordless sudo
> without extra configuration with the exact same box.
>
> My question is how is passwordless sudo achieved? Are are you aware what
> extra configure i need to do for packer, so it achieve the same seamless
> integration that vagrant does, when i get packer calling vagrant executing
> ansible?
>
> --
> 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/d7bf6e0f-c157-4de0-b78e-58898c01fb8d%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/d7bf6e0f-c157-4de0-b78e-58898c01fb8d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Alvaro

-- 
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/CAHqq0ezVJQNaK73qTXB1X%3D%3DY2H2L67iJvUvaciDf2ReP9TX%3D7w%40mail.gmail.com.

Reply via email to