Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
/ packer Public archive

Packer image builds with Ansible provisioners.

License

Notifications You must be signed in to change notification settings

wdhowe/packer

Repository files navigation

Packer

Packer image builds

Directories

  • provision -> Scripts/Playbooks used in packer image provisioners

Files

  • packer_gitlabrunner_local.json -> Build an Amazon Linux 2 EC2 AMI, using a GitLab Runner Ansible playbook in local mode.
  • packer_gitlabrunner_remote.json -> Build an Amazon Linux 2 EC2 AMI, using a GitLab Runner Ansible playbook in remote mode.

Packer Examples

Check Packer Syntax

packer validate packer_gitlabrunner_remote.json

Info About Packer File

Show information about a packer file, such as the variables, builders, provisioners, etc.

packer inspect packer_gitlabrunner_remote.json

Build with all default variables

packer build packer_gitlabrunner_remote.json

Build with variable overrides on the command line

packer build -var 'aws_subnet_id=subnet-123456789' -var 'aws_security_group_id=sg-123456789' packer_gitlabrunner_remote.json

Build with variable override file

packer build -var-file=my_vars.json packer_gitlabrunner_remote.json

File: my_vars.json

{
    "aws_subnet_id": "subnet-123456789",
    "aws_security_group_id": "sg-123456789"
}