Fixes bug where state=absent did not work

reviewable/pr18780/r1
Jonathan Mainguy 10 years ago
parent 118c79e335
commit ae34395f01

@ -356,7 +356,9 @@ def main():
# do the work! # do the work!
if action == 'absent': if action == 'absent':
if volume_name in volumes: if volume_name in volumes:
run_gluster([ 'volume', 'delete', name ]) if volumes[volume_name]['status'].lower() != 'stopped':
stop_volume(volume_name)
run_gluster_yes([ 'volume', 'delete', volume_name ])
changed = True changed = True
if action == 'present': if action == 'present':

Loading…
Cancel
Save