Packer


ansibleでGathering Factsで止まる場合


-on-error: エラー時にリソースを終了させない


ansible 2.8以降だとGathering Factsから進まない


aws_profileを指定する

  1. aws cliでprofileを作る
    aws configure --profile example
  2. packer.json
    {
      "variables": {
        "aws_profile": "{{env `AWS_PROFILE`}}",
        "aws_region": "ap-northeast-1"
      },
      "builders": [
        {
          "type": "amazon-ebs",
          "profile": "{{user `aws_profile`}}",
          "region": "{{user `aws_region`}}"
        }
      ]
    }
  3. 実行: AWS_PROFILEを環境変数として渡す場合
    AWS_PROFILE=example packer build packer.json

function "clean_ami_name" not defined


Could not find file for the medium


Failed creating VirtualBox driver: exec: "VBoxManage": executable file not found in $PATH


インストール


複数バージョンを管理したい場合


macOSX

brew install packer

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2021-01-05 (火) 17:33:08