Shell scripts to build Debian-like Virtualbox images using Packer.
PYTHON_VERSION: [required]: Python version to use for bootstrapping (e.g.3)ANSIBLE_VERSION: [required]: Ansible version to use for bootstrapping (e.g.latest,2.9.10)
{
"provisioners": [
{
"environment_vars": [
"ANSIBLE_VERSION={{ user `ansible_version` }}",
"PYTHON_VERSION={{ user `python_version` }}"
],
"execute_command": "echo 'vagrant' | {{ .Vars }} sudo -S -E sh -eux '{{ .Path }}'",
"scripts": "provisioners/shell/packer-template/bootstrap.sh",
"type": "shell"
},
{
"command": "/venv/ansible-run",
"extra_arguments": [
"--extra-vars 'packer_template_metadata_build_timestamp={{ user `build_timestamp` }}'",
"--extra-vars 'packer_template_metadata_build_revision={{ user `build_revision` }}'",
"--extra-vars 'packer_template_metadata_build_version={{ user `build_version` }}'",
"-vvvv"
],
"playbook_dir": "provisioners/ansible",
"playbook_file": "provisioners/ansible/pre.yml",
"type": "ansible-local"
}
]
}MIT
Mischa ter Smitten (based on work from chef/bento)
Are welcome!