Skip to content

Commit

Permalink
Install packer plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
myurasov committed Nov 22, 2023
1 parent d3641b5 commit 5c99b44
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ RUN apt-get install -qy terraform
# install packer
RUN apt-get install -yq packer

# init packer plugins
RUN (cd /app/src/packer/azure/isaac && packer init .)
RUN (cd /app/src/packer/aws/isaac && packer init .)

# azure command line
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash

Expand Down
13 changes: 13 additions & 0 deletions src/packer/aws/isaac/main.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
packer {
required_plugins {
amazon = {
source = "github.com/hashicorp/amazon"
version = "~> 1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
}
}

# vars can be set either from environment or the command line

variable "version" {
Expand Down
13 changes: 13 additions & 0 deletions src/packer/aws/ovami/main.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
packer {
required_plugins {
amazon = {
source = "github.com/hashicorp/amazon"
version = "~> 1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
}
}

# vars can be set either from environment or the command line

variable "version" {
Expand Down
15 changes: 14 additions & 1 deletion src/packer/azure/isaac/main.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
packer {
required_plugins {
amazon = {
source = "github.com/hashicorp/azure"
version = "~> 1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
}
}

# vars can be set either from environment or the command line

variable "azure_subscription_id" {
Expand Down Expand Up @@ -105,7 +118,7 @@ build {
groups = ["isaac"]
playbook_file = "/app/src/ansible/isaac.yml"
ansible_env_vars = [
"ANSIBLE_CONFIG=/app/src/ansible/ansible.cfg"
"ANSIBLE_CONFIG=/app/src/ansible/ansible.cfg"
]
extra_arguments = [
"--skip-tags", "${var.skip_tags}",
Expand Down

0 comments on commit 5c99b44

Please sign in to comment.