From d064534df62f5f7258433c1adc6c9b92f4d05448 Mon Sep 17 00:00:00 2001 From: Andrea Tartaglia Date: Fri, 1 Feb 2019 13:19:33 +0000 Subject: [PATCH] Added description to single net interface (#51602) * Added description to single net interface * ec2_instance single iface description changelog (cherry picked from commit b8790abcbeebfca27e1841b89850d8fe96b53fd9) --- .../fragments/51602-ec2_instance_single_iface_description.yaml | 2 ++ lib/ansible/modules/cloud/amazon/ec2_instance.py | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 changelogs/fragments/51602-ec2_instance_single_iface_description.yaml diff --git a/changelogs/fragments/51602-ec2_instance_single_iface_description.yaml b/changelogs/fragments/51602-ec2_instance_single_iface_description.yaml new file mode 100644 index 00000000000..cffa4c6c105 --- /dev/null +++ b/changelogs/fragments/51602-ec2_instance_single_iface_description.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ec2_instance - Correctly adds description when adding a single ENI to the instance diff --git a/lib/ansible/modules/cloud/amazon/ec2_instance.py b/lib/ansible/modules/cloud/amazon/ec2_instance.py index 345b8660cc9..5b5a3f2144b 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_instance.py +++ b/lib/ansible/modules/cloud/amazon/ec2_instance.py @@ -860,6 +860,8 @@ def build_network_spec(params, ec2=None): ec2=ec2 ) spec['Groups'] = [g['GroupId'] for g in groups] + if network.get('description') is not None: + spec['Description'] = network['description'] # TODO more special snowflake network things return [spec]