diff options
author | Rob White <rob.white@truelocal.com.au> | 2016-11-30 11:58:58 +1100 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2016-11-30 23:02:43 -0800 |
commit | f64e80118383e0c3885b3bd84c4c1379ce7e4e5d (patch) | |
tree | 300a2defd7efc13f52fc022f5bdc08a4687a07a0 | |
parent | 286021056f9700ab58fae92d03d9555300aef580 (diff) | |
download | ansible-modules-core-f64e80118383e0c3885b3bd84c4c1379ce7e4e5d.tar.gz |
Fail if specifying an ENI as device but in_vpc is not true
-rw-r--r-- | cloud/amazon/ec2_eip.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cloud/amazon/ec2_eip.py b/cloud/amazon/ec2_eip.py index 4fb7c2ae..83473044 100644 --- a/cloud/amazon/ec2_eip.py +++ b/cloud/amazon/ec2_eip.py @@ -376,6 +376,8 @@ def main(): if device_id and device_id.startswith('i-'): is_instance = True elif device_id: + if device_id.startswith('eni-') and not in_vpc: + module.fail_json(msg="If you are specifying an ENI, in_vpc must be true") is_instance = False try: |