2
는 포장에 바르, 내 스크립트는 다음과 같다 : 수 또한기본 변수를 사용하는 패커? 내가 옵션을 사용할 수있는 가능성을 알아 내기 위해 노력했습니다
packer build \
-var 'config=master' \
template.json
을하지만 :
"provisioners": [{
"type": "shell",
"scripts": [
"scripts/centos/5.11/puppet-{{user `config`}}.sh",
]
}],
"variables": {
"config": "{{user `type`}} | slave",
}
은 일반적인 명령이 될 것입니다 있었 다음을 수행 할 수 있습니다.
packer build template.json # were config would default to slave