|
|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
---
|
|
|
|
|
description: |
|
|
|
|
|
The ansible-local Packer provisioner configures Ansible to run on the
|
|
|
|
|
machine by Packer from local Playbook and Role files. Playbooks and Roles can
|
|
|
|
|
be uploaded from your local machine to the remote machine.
|
|
|
|
|
The ansible-local Packer provisioner will run ansible "locally" on the
|
|
|
|
|
remote/guest VM using Playbook and Role files that exist on the guest VM.
|
|
|
|
|
This means ansible must be installed on the remote/guest VM. Playbooks and
|
|
|
|
|
Roles can be uploaded from your local machine (the one running Packer) to
|
|
|
|
|
the vm.
|
|
|
|
|
layout: docs
|
|
|
|
|
page_title: 'Ansible Local - Provisioners'
|
|
|
|
|
sidebar_current: 'docs-provisioners-ansible-local'
|
|
|
|
|
@ -12,15 +14,17 @@ sidebar_current: 'docs-provisioners-ansible-local'
|
|
|
|
|
|
|
|
|
|
Type: `ansible-local`
|
|
|
|
|
|
|
|
|
|
The `ansible-local` Packer provisioner configures Ansible to run on the machine
|
|
|
|
|
by Packer from local Playbook and Role files. Playbooks and Roles can be
|
|
|
|
|
uploaded from your local machine to the remote machine. Ansible is run in [local
|
|
|
|
|
The `ansible-local` Packer provisioner will run ansible "locally" on the
|
|
|
|
|
remote/guest VM using Playbook and Role files that exist on the guest VM.
|
|
|
|
|
This means ansible must be installed on the remote/guest VM. Playbooks and
|
|
|
|
|
Roles can be uploaded from your local machine (the one running Packer) to
|
|
|
|
|
the vm. Ansible is run on the guest machine in [local
|
|
|
|
|
mode](https://docs.ansible.com/ansible/playbooks_delegation.html#local-playbooks) via the
|
|
|
|
|
`ansible-playbook` command.
|
|
|
|
|
|
|
|
|
|
-> **Note:** Ansible will *not* be installed automatically by this
|
|
|
|
|
provisioner. This provisioner expects that Ansible is already installed on the
|
|
|
|
|
machine. It is common practice to use the [shell
|
|
|
|
|
guest/remote machine. It is common practice to use the [shell
|
|
|
|
|
provisioner](/docs/provisioners/shell.html) before the Ansible provisioner to do
|
|
|
|
|
this.
|
|
|
|
|
|
|
|
|
|
|