Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant builder: Update box if exists #8

Open
ghost opened this issue Apr 21, 2021 · 0 comments
Open

Vagrant builder: Update box if exists #8

ghost opened this issue Apr 21, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 21, 2021

This issue was originally opened by @ndench as hashicorp/packer#10876. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

When using the vagrant builder, I'd like to be able to specify something like "box_update": true to ensure that the build is always happening on the latest version of the source box. The ways of achieving this now are:

  1. Use the box_version parameter -> this requires the user to check for the latest versions before every build and update their build file.
  2. Use the force_add parameter -> this will cause packer to always download the box, even when there is no new version
  3. Run vagrant box update manually before running packer

Use Case(s)

Bento boxes built by Chef, are very common base boxes and are update relatively regularly. By ensuring your build is on the latest version you will get the latest security patches.

You may also be building multiple vagrant boxes on top of each other (instead of using a third party base box). In which case, you likely want the latest version of your base box.

Potential configuration

{
  "builders": [
    {
      "communicator": "ssh",
      "source_path": "hashicorp/precise64",
      "provider": "virtualbox",
      "add_force": true,
      "type": "vagrant",
      "box_update": true
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant