docs/provisioners/ansible: Add playbook to basic example. (#8508)
This commit is contained in:
parent
b2578ee0f9
commit
bb71db6b39
|
@ -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 New Issue