- name: Run lvs
  ansible.builtin.command: "lvs --select 'vg_name = {{ item.vg }} && lv_name = {{ item.lv }}' --reportformat json"
  register: snapshot_create_lvs_response
  changed_when: false

- name: Verify that the volume was found
  ansible.builtin.assert:
    that: (((snapshot_create_lvs_response.stdout | from_json).report[0].lv) | length) > 0
    fail_msg: "Could not find volume '{{ item.lv }}' in volume group '{{ item.vg }}'"
