From ed51380c2c34a6a979b6cde45e6e819d6ed541cd Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Thu, 13 Jul 2017 15:08:03 -0400 Subject: [PATCH] [cloud] ec2_vol module snapshot and volume_size are not mutually exclusive (#26764) --- lib/ansible/modules/cloud/amazon/ec2_vol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vol.py b/lib/ansible/modules/cloud/amazon/ec2_vol.py index ea7a1dcc5c..f19378cbc1 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vol.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vol.py @@ -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)