From d2e01477ebfdb467cdd9f936d5c2fe2e1f82b249 Mon Sep 17 00:00:00 2001 From: Ted Timmons Date: Thu, 19 Oct 2017 11:59:15 -0700 Subject: [PATCH] add root_device_type filter. (#31911) * add root_device_type filter. This module is due for a refactor, but I'm piling on. * add version added --- lib/ansible/modules/cloud/amazon/ec2_ami_find.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/ec2_ami_find.py b/lib/ansible/modules/cloud/amazon/ec2_ami_find.py index b494c18e41..2eff822e4f 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_ami_find.py +++ b/lib/ansible/modules/cloud/amazon/ec2_ami_find.py @@ -143,6 +143,12 @@ options: - Virtualization type to match (e.g. hvm). default: null required: false + root_device_type: + description: + - Root device type to match (e.g. ebs, instance-store). + default: null + required: false + version_added: "2.5" no_result_action: description: - What to do when no results are found. @@ -354,6 +360,7 @@ def main(): owner = module.params.get('owner') platform = module.params.get('platform') product_code = module.params.get('product_code') + root_device_type = module.params.get('root_device_type') sort = module.params.get('sort') sort_tag = module.params.get('sort_tag') sort_order = module.params.get('sort_order') @@ -382,6 +389,8 @@ def main(): filter['platform'] = platform if product_code: filter['product-code'] = product_code + if root_device_type: + filter['root_device_type'] = root_device_type if virtualization_type: filter['virtualization_type'] = virtualization_type