Skip to content

Commit 93795e8

Browse files
tykealGerrit Code Review
authored andcommitted
Merge "fix: Add Packer 1.11.x plugin compatibility"
2 parents 55823b5 + 4d439da commit 93795e8

File tree

9 files changed

+76
-0
lines changed

9 files changed

+76
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ cloud-env.json
66
*.pyc
77
*.retry
88
node_modules/
9+
.packer.d/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
fixes:
3+
- |
4+
Fixed compatibility with Packer 1.11.x by adding explicit plugin
5+
declarations to all template files. Packer 1.11.x introduced stricter
6+
plugin validation requiring all plugins to be declared in
7+
``required_plugins`` blocks.
8+
9+
Updated templates with required_plugins blocks:
10+
11+
- builder.pkr.hcl (openstack, docker, ansible)
12+
- docker.pkr.hcl (openstack, docker, ansible)
13+
- devstack.pkr.hcl (openstack, docker, ansible)
14+
- devstack-pre-pip-yoga.pkr.hcl (openstack, docker, ansible)
15+
- windows-builder.pkr.hcl (openstack, ansible)
16+
- builder-aws.pkr.hcl (amazon, ansible)
17+
- docker-aws.pkr.hcl (amazon, ansible)
18+
19+
This fix maintains backward compatibility with Packer 1.9.x and 1.10.x
20+
while ensuring builds work correctly with Packer 1.11.x and future
21+
versions. The GitHub Actions workflow already includes the necessary
22+
``packer init`` command to download plugins.
23+
24+
Added .packer.d/ directory to .gitignore to exclude plugin cache.
25+
upgrade:
26+
- |
27+
No action required for existing deployments. All changes are backward
28+
compatible with Packer 1.9.x and 1.10.x. If upgrading to or using
29+
Packer 1.11.x, ensure ``packer init`` is run before ``packer build``
30+
or ``packer validate`` to download the required plugins (this is
31+
already handled in the CI/CD workflow).

templates/builder-aws.pkr.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ packer {
44
version = ">= 1.2.6"
55
source = "github.com/hashicorp/amazon"
66
}
7+
ansible = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/ansible"
10+
}
711
}
812
}
913

templates/builder.pkr.hcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/openstack"
66
}
7+
docker = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/docker"
10+
}
11+
ansible = {
12+
version = ">= 1.0.0"
13+
source = "github.com/hashicorp/ansible"
14+
}
715
}
816
}
917

templates/devstack-pre-pip-yoga.pkr.hcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/openstack"
66
}
7+
docker = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/docker"
10+
}
11+
ansible = {
12+
version = ">= 1.0.0"
13+
source = "github.com/hashicorp/ansible"
14+
}
715
}
816
}
917

templates/devstack.pkr.hcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/openstack"
66
}
7+
docker = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/docker"
10+
}
11+
ansible = {
12+
version = ">= 1.0.0"
13+
source = "github.com/hashicorp/ansible"
14+
}
715
}
816
}
917

templates/docker-aws.pkr.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ packer {
44
version = ">= 1.2.6"
55
source = "github.com/hashicorp/amazon"
66
}
7+
ansible = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/ansible"
10+
}
711
}
812
}
913

templates/docker.pkr.hcl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/openstack"
66
}
7+
docker = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/docker"
10+
}
11+
ansible = {
12+
version = ">= 1.0.0"
13+
source = "github.com/hashicorp/ansible"
14+
}
715
}
816
}
917

templates/windows-builder.pkr.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/openstack"
66
}
7+
ansible = {
8+
version = ">= 1.0.0"
9+
source = "github.com/hashicorp/ansible"
10+
}
711
}
812
}
913

0 commit comments

Comments
 (0)