mirror of https://github.com/ansible/ansible.git
Fix bug where ansible_lvm facts silently fails if a PV isn't in an VG (#28684)
If a PV hasn't been added to a VG i.e.: [pmcclory@box ~]$ sudo pvs --noheadings --nosuffix --units g /dev/xvdb lvm2 ---- 10.00 10.00 /dev/xvdv1 vg0 lvm2 a--u 24.99 0 Than ansible_facts.ansible_lvm will be unset after running setup module. The issue is that the module splits on whitespace, which causes an indexing error when the VG column is empty. Fix is to add the separator field and safely split on that.pull/26059/merge
parent
c1be5b2389
commit
5065bf169d
Loading…
Reference in New Issue