From 3e9f0b6e6e19ac1870063694543fbac81b079262 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Thu, 16 Jul 2020 01:31:41 +0530 Subject: [PATCH] Docs: sanity fixes (#133) Signed-off-by: Abhijeet Kasurde --- plugins/modules/ec2_instance.py | 11 +++++++---- plugins/modules/ec2_instance_info.py | 9 +++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/plugins/modules/ec2_instance.py b/plugins/modules/ec2_instance.py index 9382659f71b..bbaa092bd5c 100644 --- a/plugins/modules/ec2_instance.py +++ b/plugins/modules/ec2_instance.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_instance version_added: 1.0.0 @@ -25,6 +25,7 @@ description: - If you specify one or more instance IDs, only instances that have the specified IDs are returned. type: list + elements: str state: description: - Goal state for the instances. @@ -107,6 +108,7 @@ description: - A list of security group IDs or names (strings). Mutually exclusive with I(security_group). type: list + elements: str security_group: description: - A security group ID or name. Mutually exclusive with I(security_groups). @@ -180,6 +182,7 @@ ebs.iops, and ebs.delete_on_termination. - For more information about each parameter, see U(https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html). type: list + elements: dict launch_template: description: - The EC2 launch template to base instance configuration on. @@ -1681,7 +1684,7 @@ def main(): ebs_optimized=dict(type='bool'), vpc_subnet_id=dict(type='str', aliases=['subnet_id']), availability_zone=dict(type='str'), - security_groups=dict(default=[], type='list'), + security_groups=dict(default=[], type='list', elements='str'), security_group=dict(type='str'), instance_role=dict(type='str'), name=dict(type='str'), @@ -1700,9 +1703,9 @@ def main(): instance_initiated_shutdown_behavior=dict(type='str', choices=['stop', 'terminate']), termination_protection=dict(type='bool'), detailed_monitoring=dict(type='bool'), - instance_ids=dict(default=[], type='list'), + instance_ids=dict(default=[], type='list', elements='str'), network=dict(default=None, type='dict'), - volumes=dict(default=None, type='list'), + volumes=dict(default=None, type='list', elements='dict'), ) # running/present are synonyms # as are terminated/absent diff --git a/plugins/modules/ec2_instance_info.py b/plugins/modules/ec2_instance_info.py index 8883be6923d..c9820a58f59 100644 --- a/plugins/modules/ec2_instance_info.py +++ b/plugins/modules/ec2_instance_info.py @@ -6,7 +6,7 @@ __metaclass__ = type -DOCUMENTATION = ''' +DOCUMENTATION = r''' --- module: ec2_instance_info version_added: 1.0.0 @@ -24,6 +24,7 @@ - If you specify one or more instance IDs, only instances that have the specified IDs are returned. required: false type: list + elements: str filters: description: - A dict of filters to apply. Each dict item consists of a filter key and a filter value. See @@ -39,7 +40,7 @@ ''' -EXAMPLES = ''' +EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Gather information about all instances @@ -67,7 +68,7 @@ ''' -RETURN = ''' +RETURN = r''' instances: description: a list of ec2 instances returned: always @@ -540,7 +541,7 @@ def main(): argument_spec = ec2_argument_spec() argument_spec.update( dict( - instance_ids=dict(default=[], type='list'), + instance_ids=dict(default=[], type='list', elements='str'), filters=dict(default={}, type='dict') ) )