Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

packer builder creates azure golden image and uses ansible provisioner for configuring server

NotificationsYou must be signed in to change notification settings

Christochi/azure-packer-golden-image

Repository files navigation

Description

builds a golden image using a RHEL OS base image from azure, downloads vault, azure cli, goss, uploads files, configurations and installs necessary applications in the golden image

Requirement

  • install packer
  • working knowledge of ansible
  • working knowledge ofgoss for validating configuration

Setup

  • add the values forclient-id,client-secret,subscription-id,tenant-id,az_image_name,managed-image-rg-name, invariables.auto.pkrvars.hcl.example file

Usage Example

client-id             = "c5bgyg0-575-....."client-secret         = "AdCD419~F...."subscription-id       = "c4774376-......"tenant-id             = "b9rc7889-....."az_image_name         = "your-custom-image-name"managed-image-rg-name = "your-resource-group" # not parker created
  • you can also change thelocation,img-publisher,img-offer,img-sku,os-type in thevariables.auto.pkrvars.hcl.example(optional)

Usage Example

img-publisher         = "Redhat"img-offer             = "RHEL"img-sku               = "8.2"location              = "Canada Central"os-type               = "Linux"
  • rename thevariables.auto.pkrvars.hcl.example tovariables.auto.pkrvars.hcl

  • runpacker fmt . for formatting code(optional)

  • runpacker validate . for ensuring no syntax error(optional)

  • runpacker build . for building the image

Internals

information about the ansible provisoner, go to ansiblereadme


[8]ページ先頭

©2009-2025 Movatter.jp