[cloud] ec2_vol module snapshot and volume_size are not mutually exclusive (#26764)

This commit is contained in:
Sloane Hertel 2017-07-13 15:08:03 -04:00 committed by Ryan Brown
parent 2a92120ffa
commit ed51380c2c

View file

@ -609,8 +609,8 @@ def main():
if not volume_size and not (id or name or snapshot):
module.fail_json(msg="You must specify volume_size or identify an existing volume by id, name, or snapshot")
if volume_size and (id or snapshot):
module.fail_json(msg="Cannot specify volume_size together with id or snapshot")
if volume_size and id:
module.fail_json(msg="Cannot specify volume_size together with id")
if state == 'present':
volume, changed = create_volume(module, ec2, zone)