Commit 5579691b by Michael DeHaan

Merge pull request #3745 from jimi1283/issue_3714

Set result to skipped when vol group is missing and lv state=absent
parents 31ccf1df e32a6110
......@@ -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))
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment