# Playbooks can now do includes / useful for class-like features!

**URL:** <https://forum.ansible.com/t/playbooks-can-now-do-includes-useful-for-class-like-features/11318>\
**Category:** Ansible Project\
**Created:** [March 3, 2012, 6:13pm UTC](https://forum.ansible.com/t/playbooks-can-now-do-includes-useful-for-class-like-features/11318 "2012-03-03T18:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [March 3, 2012, 6:13pm UTC](https://forum.ansible.com/t/playbooks-can-now-do-includes-useful-for-class-like-features/11318/1 "2012-03-03T18:13:01Z")

</div>

Want to emulate “class assignment” (like in Puppet) in ansible? You now easily can, with include statements:

[https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml](https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml)

In each task section you can import one or more lists of tasks.

You can also do the same to reuse handlers, which only run when change events call them out by name.

Should be pretty useful as both a base of a config management system as well as a deployment system, which is, of course, the whole goal of the project.

Please bang on this with a big hammer and let me know what you think.

–Michael
