Skip to content

Commit

Permalink
Wait for drain - filter also by group name
Browse files Browse the repository at this point in the history
Add group name to the select filter to make sure the returned list has only one result

Co-authored-by: Bob Mader <[email protected]>
  • Loading branch information
ygalblum and swapdisk authored Oct 1, 2023
1 parent e632f2a commit b049d3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/lvm_snapshots/tasks/revert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
when: lvm_snapshots_boot_backup

- name: Wait for the snapshot to drain
ansible.builtin.command: "lvs --select 'lv_name = {{ item.origin }}' --reportformat json"
ansible.builtin.command: "lvs --select 'vg_name = {{ item.vg_name }} && lv_name = {{ item.origin }}' --reportformat json"
register: _lv_drain_check
until: (_lv_drain_check.stdout | from_json).report[0].lv[0].data_percent == ""
retries: 20
Expand Down

0 comments on commit b049d3f

Please sign in to comment.