ansible/ansible — pull request #5237 by jsmartin (2013-12-10 15:31:48+00:00)
Title: Module for determining which physical disks correspond with a given directory.

Let's say that /foo was mounted to a logical volume that was created on top of multiple raid sets. This would return the physical drives that make up the volume where /foo lives. This useful when you need to know the physical disk device names for tuning.

- name: find disks for /foo
dir_to_disk: directory=/foo
register: output

- name: tune disks
shell: echo noop > /sys/block/{{ item }}/queue/scheduler
with_items: output.disk_names