最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Packer - Copy & Update file in one go - Stack Overflow

programmeradmin1浏览0评论

I am looking to make an Amazon AMI using Packer. I have a YAML file which I can copy across successfully.

"provisioners": [
 {
    "type": "file",
    "source": "flights.yaml",
    "destination": "/tmp/flights.yaml"
 }
]

However, there is one value in the file I would like to pass in as a variable.

 packer build \
    -var "ami_name=flights-november" \
    -var "source_ami=ami-XXX" \
    -var "seed_data={thisiswhatIwantinthefile}"
    ./ami.json

Is there a clean way to do this? Other than something like a search and replace?

connecting: false
 MCT: {thisiswhatIwanttoreplace}
 terminal-1:
   - jetblue
   - american
   - untied
 terminal-2:
   - airfrance
   - lufthansa
发布评论

评论列表(0)

  1. 暂无评论