1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #3745 from jimi1283/issue_3714

Set result to skipped when vol group is missing and lv state=absent
This commit is contained in:
Michael DeHaan 2013-08-03 10:52:48 -07:00
commit 5579691b9f

View file

@ -141,7 +141,10 @@ def main():
rc,current_lvs,err = module.run_command("lvs --noheadings -o lv_name,size --units %s --separator ';' %s" % (unit, vg)) rc,current_lvs,err = module.run_command("lvs --noheadings -o lv_name,size --units %s --separator ';' %s" % (unit, vg))
if rc != 0: if rc != 0:
module.fail_json(msg="Volume group %s does not exist."%vg, rc=rc, err=err) if state == 'absent':
module.exit_json(changed=False,stdout="Volume group %s does not exist." % vg, stderr=False)
else:
module.fail_json(msg="Volume group %s does not exist."%vg, rc=rc, err=err)
changed = False changed = False