mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
ec2_instance: Force int when ebs.volume_size or ebs.iops is specified (#55716)
* Force int when volume_size is specified * changelog * both volume_size and iops must be int * updated changelog fragment
This commit is contained in:
committed by
Will Thames
parent
1462fd740b
commit
5a6f888036
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- ec2_instance - Ensures ``ebs.volume_size`` and ``ebs.iops`` are ``int`` to avoid issues with Jinja2 templating
|
||||
@@ -818,6 +818,11 @@ def manage_tags(match, new_tags, purge_tags, ec2):
|
||||
|
||||
def build_volume_spec(params):
|
||||
volumes = params.get('volumes') or []
|
||||
for volume in volumes:
|
||||
if 'ebs' in volume:
|
||||
for int_value in ['volume_size', 'iops']:
|
||||
if int_value in volume['ebs']:
|
||||
volume['ebs'][int_value] = int(volume['ebs'][int_value])
|
||||
return [ec2_utils.snake_dict_to_camel_dict(v, capitalize_first=True) for v in volumes]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user