mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
docs/provisioners/ansible: Add playbook to basic example. (#8508)
This commit is contained in:
parent
b2578ee0f9
commit
bb71db6b39
1 changed files with 19 additions and 1 deletions
|
|
@ -25,6 +25,7 @@ provisioner.
|
|||
This is a fully functional template that will provision an image on
|
||||
DigitalOcean. Replace the mock `api_token` value with your own.
|
||||
|
||||
Example Packer template:
|
||||
``` json
|
||||
{
|
||||
"provisioners": [
|
||||
|
|
@ -45,6 +46,23 @@ DigitalOcean. Replace the mock `api_token` value with your own.
|
|||
}
|
||||
```
|
||||
|
||||
Example playbook:
|
||||
|
||||
```
|
||||
---
|
||||
# playbook.yml
|
||||
- name: "Provision Image"
|
||||
hosts: default
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: install Apache
|
||||
package:
|
||||
name: "httpd"
|
||||
state: present
|
||||
|
||||
```
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
Required Parameters:
|
||||
|
|
@ -451,4 +469,4 @@ Example playbook:
|
|||
- name: install Apache
|
||||
yum:
|
||||
name: httpd
|
||||
```
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue