Skip to content
masterclass Buddy

DevOps · Service

Ansible

Packer's Ansible provisioner runs an Ansible playbook during an image build. It creates or uses an inventory, connects to the target, and applies the playbook.

Last updated

Syntax

provisioner "ansible" {
  playbook_file = "path/to/playbook.yml"
}

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • ansible_env_vars
  • ansible_ssh_extra_args
  • inventory_file
  • inventory_file_template
  • keep_inventory_file
  • galaxy_file
  • use_proxy
  • packer_build_name

Source: Ansible Provisioner | Integrations | Packer | HashiCorp Developer. Checked 2026-11-03.