# Pedantically commented playbook example

**URL:** <https://forum.ansible.com/t/pedantically-commented-playbook-example/11607>\
**Category:** Ansible Project\
**Created:** [June 8, 2012, 8:20pm UTC](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607 "2012-06-08T20:20:44Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Fred\_Alger](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@Fred\_Alger](https://forum.ansible.com/u/Fred_Alger)\
**Post date:** [July 3, 2012, 8:29pm UTC](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607/21 "2012-07-03T20:29:32Z")

</div>

> Fred, thanks for the awesome example. I have found a bug, in the example for what a vars\_file should look like…

Good catch, thanks. Updated.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [July 3, 2012, 8:46pm UTC](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607/22 "2012-07-03T20:46:23Z")

</div>

> If anyone else has well-commented examples to contribute, that’d be great. I don’t want this to all live off in my repo, though, so let’s see if we can make some more examples to ship with Ansible and maybe improve the docs while we’re at it.

Haven’t really been reading this too closely, but I’m willing to make a final edit pass when you think you’re done and host it on the doc site.

If I haven’t said so already, I am very happy to see the fish sticks reference.

–Michael

---

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [July 5, 2012, 5:35am UTC](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607/23 "2012-07-05T05:35:00Z")

</div>

> template (temp.j2):  
> ------------------------------------------
> 
> domain: {{ domain }}  
> server: {{ server }}  
> dollarserver: $server
> 
> playbook (simple.yaml):  
> ------------------------------------------
> 
> ---  
> - hosts: dnsservers  
> &nbsp;&nbsp;vars:  
> &nbsp;&nbsp;&nbsp;&nbsp;domain: example.org  
> &nbsp;&nbsp;&nbsp;&nbsp;server: www.${domain}  
> &nbsp;&nbsp;user: root  
> &nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;- name: Templ with var  
> &nbsp;&nbsp;&nbsp;&nbsp;action: template src=temp.j2 dest=/tmp/temp.txt
> 
> output on node (/tmp/temp.txt):  
> ------------------------------------------
> 
> domain: example.org  
> server: www.${domain}  
> dollarserver: $server

Tried this again with -devel, and now it works as I expected it to.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [August 30, 2012, 1:15pm UTC](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607/24 "2012-08-30T13:15:35Z")

</div>

I suspect there is something wrong with your playbook formatting.

Can you paste what you have? It's impossible to tell with what  
information you have provided.

[Previous page](https://forum.ansible.com/t/pedantically-commented-playbook-example/11607.md?page=1)
