---

- name: Configure directory pool
  ansible.builtin.command:
    cmd: >
      om cluster set
      --kw pool#{{ osvc_pool_name }}.type={{ osvc_pool_type }}
  run_once: true
  register: output
  changed_when: output.rc == 0

- name: Configure directory pool path
  ansible.builtin.command:
    cmd: >
      om cluster set
      --kw pool#{{ osvc_pool_name }}.path={{ osvc_pool_path }}
  run_once: true
  register: output
  changed_when: output.rc == 0
  when:
    - (osvc_pool_path is defined) and (osvc_pool_path|length > 0)
