admin管理员组文章数量:1023782
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
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
本文标签: PackerCopy amp Update file in one goStack Overflow
版权声明:本文标题:Packer - Copy & Update file in one go - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745604589a2158654.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论