Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set result to skipped when vol group is missing and lv state=absent #3745

Merged
merged 2 commits into from
Aug 3, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion library/system/lvol
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down