docs/provisioners/ansible: Add playbook to basic example. (#8508)

This commit is contained in:
hairesis 2020-01-07 10:07:05 +00:00 committed by Adrien Delorme
parent b2578ee0f9
commit bb71db6b39
1 changed files with 19 additions and 1 deletions

View File

@ -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
```
```