# variations on distro and version?

**URL:** <https://forum.ansible.com/t/variations-on-distro-and-version/12785>\
**Category:** Ansible Project\
**Tags:** rhel, ansible-project, ubuntu\
**Created:** [May 9, 2013, 1:31pm UTC](https://forum.ansible.com/t/variations-on-distro-and-version/12785 "2013-05-09T13:31:23Z")\
**Posts on this page:** 1\
**Page:** 1

<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:** [May 9, 2013, 1:31pm UTC](https://forum.ansible.com/t/variations-on-distro-and-version/12785/1 "2013-05-09T13:31:23Z")

</div>

You should use the group\_by module.

It is highly misleading to think you can abstract away packaging by just selecting the package manager – names, config files, and other things are always different.  
Think about how Apache has sites\_enabled on Ubuntu, but not on RHEL, for instance. SELinux vs AppArmor. The list goes on.

The group\_by idiom looks like this:

[https://github.com/jsmartin/ansible-examples/blob/riak/riak/roles/bootstrap/common/tasks/main.yml](https://github.com/jsmartin/ansible-examples/blob/riak/riak/roles/bootstrap/common/tasks/main.yml)

[https://github.com/jsmartin/ansible-examples/blob/riak/riak/setup\_riak.yml](https://github.com/jsmartin/ansible-examples/blob/riak/riak/setup_riak.yml)
