Example of building LXD images with Packer
https://petrovs.info/post/2020-11-03-building-lxd-with-packer/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
635 B
27 lines
635 B
{
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"inline": "[ \"$(ansible --version > /dev/null && echo ok)\" != 'ok' ] && apt update && apt -y install ansible || echo 'ansible already installed.'"
|
|
},
|
|
{
|
|
"type": "ansible-local",
|
|
"playbook_file": "./playbook/example-playbook.yml",
|
|
"playbook_dir" : "./playbook"
|
|
}
|
|
],
|
|
|
|
|
|
"builders": [
|
|
{
|
|
"type": "lxd",
|
|
"name": "acme-focal",
|
|
"image": "ubuntu-daily:focal",
|
|
"output_image": "acme_ubuntu-focal",
|
|
"init_sleep": "10",
|
|
"publish_properties": {
|
|
"description": "Focal image by ACME corp."
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|