# comments at end-of-line ??

**URL:** <https://forum.ansible.com/t/comments-at-end-of-line/13113>\
**Category:** Ansible Project\
**Created:** [July 12, 2013, 8:29pm UTC](https://forum.ansible.com/t/comments-at-end-of-line/13113 "2013-07-12T20:29:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_L](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Andy\_L](https://forum.ansible.com/u/Andy_L)\
**Post date:** [July 12, 2013, 8:29pm UTC](https://forum.ansible.com/t/comments-at-end-of-line/13113/1 "2013-07-12T20:29:36Z")

</div>

None of the Ansible playbook documentation I have seen shows putting comments at the end of a line.

YAML supports end-of-line comments, and my initial test with end-of-line comments in ansible playbooks seem to work fine.

Is there some technical reason to avoid end-of-line comments in ansible playbooks?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [July 12, 2013, 9:22pm UTC](https://forum.ansible.com/t/comments-at-end-of-line/13113/2 "2013-07-12T21:22:38Z")

</div>

There is none, as we are just using PyYAML for standard YAML parsing.

I do find above line comments easier to read, so typically go with those.

(The “name” field on a task or playbook can also serve as a comment of sorts, that will actually show when running the playbook.)
