summaryrefslogtreecommitdiffstats
path: root/roles/ands_facts/tasks/detect_data_path.yml
blob: 0837e1227c1c50c16d3d7426363a3c937ba6b11a (plain)
1
2
3
4
5
6
7
8
9
10
---
- name: Try to detect ands_data_path
  set_fact: ands_data_path="{{ item.mount }}"
  with_items: "{{ ansible_mounts }}"
  no_log: true
  when: 
    - not ands_data_path is defined
    - ansible_lvm.lvs[ands_data_lv] is defined
    - ansible_lvm.lvs[ands_data_lv].size_g > ( ands_data_device_threshold | default(ands_data_device_default_threshold) )
    - item.device == "/dev/mapper/{{ands_data_vg}}-{{ands_data_lv}}"