You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have a template to provision a base image for our applications, which I'd like to run a specific provisioner for based on the builder type. This would allow us to have to run multiple 'configurations' into the same template and build one version of the image with Enhanced Networking and one without.
I'd like to be able to pass the $PROVISIONER variable containing 'Amazon-Machine-Base-Image' or 'Amazon-Machine-Enhanced-Networking-Image' to Packer, so that only the provisioner that matches the "name" variable is run. Here's the template I'm working with:
I have verified that the provisioner_name variable is being populated properly and being passed to Packer. It would seem that Packer isn't aware of the contents of this variable when it parses the provisioners, as it throws this error:
* provisioner 1: 'only' specified builder 'Amazon-Machine-Base-Image' not found
* provisioner 2: 'only' specified builder 'Amazon-Machine-Enhanced-Networking-Base-Image' not found
Could someone confirm that it is expected behaviour for the builder type to be constant, and if so, is there a solution for this where we can keep just one template for both enhanced and non-enhanced networking images?
I am running Packer 1.1.0 on Amazon Linux 2017.03.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 2, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We currently have a template to provision a base image for our applications, which I'd like to run a specific provisioner for based on the builder type. This would allow us to have to run multiple 'configurations' into the same template and build one version of the image with Enhanced Networking and one without.
I'd like to be able to pass the $PROVISIONER variable containing 'Amazon-Machine-Base-Image' or 'Amazon-Machine-Enhanced-Networking-Image' to Packer, so that only the provisioner that matches the "name" variable is run. Here's the template I'm working with:
I have verified that the
provisioner_name
variable is being populated properly and being passed to Packer. It would seem that Packer isn't aware of the contents of this variable when it parses the provisioners, as it throws this error:Could someone confirm that it is expected behaviour for the builder type to be constant, and if so, is there a solution for this where we can keep just one template for both enhanced and non-enhanced networking images?
I am running Packer 1.1.0 on Amazon Linux 2017.03.
The text was updated successfully, but these errors were encountered: