---
  - name: stat the block device path
    stat:
      path: "{{ docker_direct_lvm_block_device_path }}"
    register: block_device_stat
  - name: fail if the block device does not exists
    fail:
      msg: "Block device specified for docker storage does not exist."
    when: block_device_stat.stat.exists == False
  - name: fail if the provided path is not a block device
    fail:
      msg: "{{ docker_direct_lvm_block_device_path }} is not a block device."
    when: block_device_stat.stat.isblk == False
  - name: fail if the block device is already mounted
    fail:
      msg: "Block deviced specified for docker storage is currently mounted. This should be an unmounted, unused device"
    with_items: "(( ansible_mounts }}"
    when: item.device == "{{ docker_direct_lvm_block_device_path }}"

---
  - name: stat the block device path
    stat:
      path: "{{ docker_direct_lvm_block_device_path }}"
    register: block_device_stat
  - name: fail if the block device does not exists
    fail:
      msg: "Block device specified for docker storage does not exist."
    when: block_device_stat.stat.exists == False
  - name: fail if the provided path is not a block device
    fail:
      msg: "{{ docker_direct_lvm_block_device_path }} is not a block device."
    when: block_device_stat.stat.isblk == False
  - name: fail if the block device is already mounted
    fail:
      msg: "Block deviced specified for docker storage is currently mounted. This should be an unmounted, unused device"
    with_items: "{{ ansible_mounts }}"
    when: item.device == "{{ docker_direct_lvm_block_device_path }}"

Fix typo in ansible_mounts expand
Fix typo in ansible_mounts expand