packer-cn/test/fixtures/builder-lxc/minimal.json

32 lines
918 B
JSON

{
"variables": {
"template_name": "debian",
"template_parameters": "SUITE=jessie",
"container_name": "packer-lxc",
"set_var": "hello"
},
"provisioners": [
{
"type": "shell",
"inline": [
"if [ \"$SET_VAR\" != \"{{user `set_var`}}\" ]; then",
" echo \"Got unexpected value '$SET_VAR' for SET_VAR\" 1>&2",
" exit 1",
"fi"
]
}
],
"builders": [
{
"type": "lxc",
"name": "lxc-{{user `template_name`}}",
"template_name": "{{user `template_name`}}",
"container_name": "{{user `container_name`}}",
"create_options": [ "-f", "{{user `init_config`}}" ],
"attach_options": [ "--clear-env", "--set-var", "SET_VAR={{user `set_var`}}" ],
"config_file": "/usr/share/lxc/config/{{user `template_name`}}.common.conf",
"template_environment_vars": [ "{{user `template_parameters`}}" ]
}
]
}