From bb71db6b395e89b42f0e6dc937d73dec522c9585 Mon Sep 17 00:00:00 2001 From: hairesis <0x41ndrea@gmail.com> Date: Tue, 7 Jan 2020 10:07:05 +0000 Subject: [PATCH] docs/provisioners/ansible: Add playbook to basic example. (#8508) --- .../docs/provisioners/ansible.html.md.erb | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/website/source/docs/provisioners/ansible.html.md.erb b/website/source/docs/provisioners/ansible.html.md.erb index 4f4a481c1..ff2608cca 100644 --- a/website/source/docs/provisioners/ansible.html.md.erb +++ b/website/source/docs/provisioners/ansible.html.md.erb @@ -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 -``` \ No newline at end of file +```