---
- block:
  - name: Ensure all required packages are installed
    yum: name={{item}} state=present
    with_items:
      - heketi-client

  - include_tasks: heketi_resources.yml
    run_once: true
    delegate_to: "{{ groups.masters[0] }}"
    when: ansible_lvm.lvs.{{ ands_heketi_lv }} is defined

  when: ansible_lvm.lvs.{{ ands_heketi_lv }} is defined