Skip to content

Commit

Permalink
Sanity test / doc-default-does-not-match-spec fixups (#320)
Browse files Browse the repository at this point in the history
* Sanity test / doc-default-does-not-match-spec fixups
* General docs cleanup
  • Loading branch information
tremble authored Dec 7, 2020
1 parent e9b543f commit b22f280
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 127 deletions.
24 changes: 13 additions & 11 deletions plugins/modules/aws_api_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
version_added: 1.0.0
short_description: Manage AWS API Gateway APIs
description:
- Allows for the management of API Gateway APIs
- Allows for the management of API Gateway APIs.
- Normally you should give the api_id since there is no other
stable guaranteed unique identifier for the API. If you do
not give api_id then a new API will be created each time
Expand All @@ -40,7 +40,7 @@
swagger_file:
description:
- JSON or YAML file containing swagger definitions for API.
Exactly one of swagger_file, swagger_text or swagger_dict must
Exactly one of I(swagger_file), I(swagger_text) or I(swagger_dict) must
be present.
type: path
aliases: ['src', 'api_file']
Expand All @@ -60,13 +60,13 @@
type: str
deploy_desc:
description:
- Description of the deployment - recorded and visible in the
AWS console.
- Description of the deployment.
- Recorded and visible in the AWS console.
default: Automatic deployment by Ansible.
type: str
cache_enabled:
description:
- Enable API GW caching of backend responses. Defaults to false.
- Enable API GW caching of backend responses.
type: bool
default: false
cache_size:
Expand All @@ -83,20 +83,22 @@
description:
- Canary settings for the deployment of the stage.
- 'Dict with following settings:'
- 'percentTraffic: The percent (0-100) of traffic diverted to a canary deployment.'
- 'deploymentId: The ID of the canary deployment.'
- 'stageVariableOverrides: Stage variables overridden for a canary release deployment.'
- 'useStageCache: A Boolean flag to indicate whether the canary deployment uses the stage cache or not.'
- 'C(percentTraffic): The percent (0-100) of traffic diverted to a canary deployment.'
- 'C(deploymentId): The ID of the canary deployment.'
- 'C(stageVariableOverrides): Stage variables overridden for a canary release deployment.'
- 'C(useStageCache): A Boolean flag to indicate whether the canary deployment uses the stage cache or not.'
- See docs U(https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/apigateway.html#APIGateway.Client.create_stage)
type: dict
tracing_enabled:
description:
- Specifies whether active tracing with X-ray is enabled for the API GW stage.
type: bool
default: false
endpoint_type:
description:
- Type of endpoint configuration, use C(EDGE) for an edge optimized API endpoint,
- C(REGIONAL) for just a regional deploy or PRIVATE for a private API.
- Type of endpoint configuration.
- Use C(EDGE) for an edge optimized API endpoint,
C(REGIONAL) for just a regional deploy or C(PRIVATE) for a private API.
- This flag will only be used when creating a new API Gateway setup, not for updates.
choices: ['EDGE', 'REGIONAL', 'PRIVATE']
type: str
Expand Down
15 changes: 8 additions & 7 deletions plugins/modules/aws_application_scaling_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
- for details of the parameters and returns see
U(http://boto3.readthedocs.io/en/latest/reference/services/application-autoscaling.html#ApplicationAutoScaling.Client.put_scaling_policy)
description:
- Creates, updates or removes a Scaling Policy
- Creates, updates or removes a Scaling Policy.
author:
- Gustavo Maia (@gurumaia)
- Chen Leibovich (@chenl87)
requirements: [ json, botocore, boto3 ]
options:
state:
description: Whether a policy should be present or absent
description: Whether a policy should be C(present) or C(absent).
required: yes
choices: ['absent', 'present']
type: str
Expand Down Expand Up @@ -57,12 +57,12 @@
choices: ['StepScaling', 'TargetTrackingScaling']
type: str
step_scaling_policy_configuration:
description: A step scaling policy. This parameter is required if you are creating a policy and the policy type is StepScaling.
description: A step scaling policy. This parameter is required if you are creating a policy and I(policy_type=StepScaling).
required: no
type: dict
target_tracking_scaling_policy_configuration:
description:
- A target tracking policy. This parameter is required if you are creating a new policy and the policy type is TargetTrackingScaling.
- A target tracking policy. This parameter is required if you are creating a new policy and I(policy_type=TargetTrackingScaling).
- 'Full documentation of the suboptions can be found in the API documentation:'
- 'U(https://docs.aws.amazon.com/autoscaling/application/APIReference/API_TargetTrackingScalingPolicyConfiguration.html)'
required: no
Expand All @@ -84,7 +84,7 @@
description: The time (in seconds) to wait after scaling-out before another scaling action can occur.
type: int
TargetValue:
description: The target value for the metric
description: The target value for the metric.
type: float
minimum_tasks:
description: The minimum value to scale to in response to a scale in event.
Expand All @@ -97,9 +97,10 @@
required: no
type: int
override_task_capacity:
description: Whether or not to override values of minimum and/or maximum tasks if it's already set.
description:
- Whether or not to override values of minimum and/or maximum tasks if it's already set.
- Defaults to C(false).
required: no
default: no
type: bool
extends_documentation_fragment:
- amazon.aws.aws
Expand Down
7 changes: 4 additions & 3 deletions plugins/modules/aws_direct_connect_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@
type: str
forced_update:
description:
- To modify bandwidth or location the connection will need to be deleted and recreated.
By default this will not happen - this option must be set to True.
- To modify I(bandwidth) or I(location) the connection needs to be deleted and recreated.
- By default this will not happen. This option must be explicitly set to C(true) to change I(bandwith) or I(location).
type: bool
default: false
'''

EXAMPLES = """
Expand All @@ -93,7 +94,7 @@
name: ansible-test-connection
location: EqDC2
bandwidth: 10Gbps
forced_update: True
forced_update: true
# delete the connection
- community.aws.aws_direct_connect_connection:
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/aws_direct_connect_link_aggregation_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- This allows the minimum number of links to be set to 0, any hosted connections disassociated,
and any virtual interfaces associated to the LAG deleted.
type: bool
default: false
connection_id:
description:
- A connection ID to link with the link aggregation group upon creation.
Expand All @@ -67,12 +68,14 @@
description:
- To be used with I(state=absent) to delete connections after disassociating them with the LAG.
type: bool
default: false
wait:
description:
- Whether or not to wait for the operation to complete.
- May be useful when waiting for virtual interfaces to be deleted.
- The time to wait can be controlled by setting I(wait_timeout).
type: bool
default: false
wait_timeout:
description:
- The duration in seconds to wait if I(wait=true).
Expand Down
24 changes: 12 additions & 12 deletions plugins/modules/cloudfront_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
tags:
description:
- Should be input as a dict of key-value pairs.
- Note that numeric keys or values must be wrapped in quotes. e.g. "Priority:" '1'
- "Note that numeric keys or values must be wrapped in quotes. e.g. C(Priority: '1')"
type: dict
purge_tags:
Expand All @@ -87,7 +87,7 @@
aliases:
description:
- A list) of domain name aliases (CNAMEs) as strings to be used for the distribution.
- A list of domain name aliases (CNAMEs) as strings to be used for the distribution.
- Each alias must be unique across all distribution for the AWS account.
type: list
elements: str
Expand Down Expand Up @@ -141,7 +141,7 @@
description:
- Custom headers you wish to add to the request before passing it to the origin.
- For more information see the CloudFront documentation
at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html)
at U(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/forward-custom-headers.html).
type: list
elements: dict
suboptions:
Expand Down Expand Up @@ -191,7 +191,7 @@
description:
- A dict specifying the default cache behavior of the distribution.
- If not specified, the I(target_origin_id) is defined as the I(target_origin_id) of the first valid
I(cache_behavior) in I(cache_behaviors) with defaults.
cache_behavior in I(cache_behaviors) with defaults.
suboptions:
target_origin_id:
description:
Expand Down Expand Up @@ -492,7 +492,7 @@
enabled:
description:
- A boolean value that specifies whether the distribution is enabled or disabled.
default: false
- Defaults to C(false).
type: bool
viewer_certificate:
Expand All @@ -504,18 +504,18 @@
type: bool
description:
- If you're using the CloudFront domain name for your distribution, such as C(123456789abcde.cloudfront.net)
you should set I(cloudfront_default_certificate=true)
you should set I(cloudfront_default_certificate=true).
- If I(cloudfront_default_certificate=true) do not set I(ssl_support_method).
iam_certificate_id:
type: str
description:
- The ID of a certificate stored in IAM to use for HTTPS connections.
- If I(iam_certificate_id) is set then you must also specify I(ssl_support_method)
- If I(iam_certificate_id) is set then you must also specify I(ssl_support_method).
acm_certificate_arn:
type: str
description:
- The ID of a certificate stored in ACM to use for HTTPS connections.
- If I(acm_certificate_id) is set then you must also specify I(ssl_support_method)
- If I(acm_certificate_id) is set then you must also specify I(ssl_support_method).
ssl_support_method:
type: str
description:
Expand All @@ -541,12 +541,12 @@
type: str
description:
- The method that you want to use to restrict distribution of your content by country.
- Valid values are C(none), C(whitelist), C(blacklist)
- Valid values are C(none), C(whitelist), C(blacklist).
items:
description:
- A list of ISO 3166-1 two letter (Alpha 2) country codes that the
restriction should apply to.
- 'See the ISO website for a full list of codes U(https://www.iso.org/obp/ui/#search/code/)'
- 'See the ISO website for a full list of codes U(https://www.iso.org/obp/ui/#search/code/).'
type: list
web_acl_id:
Expand All @@ -558,14 +558,14 @@
description:
- The version of the http protocol to use for the distribution.
- AWS defaults this to C(http2).
- Valid values are C(http1.1) and C(http2)
- Valid values are C(http1.1) and C(http2).
type: str
ipv6_enabled:
description:
- Determines whether IPv6 support is enabled or not.
- Defaults to C(false).
type: bool
default: false
wait:
description:
Expand Down
10 changes: 6 additions & 4 deletions plugins/modules/ec2_ami_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
type: str
name:
description:
- The name of the new AMI to copy. (As of 2.3 the default is 'default', in prior versions it was 'null'.)
- The name of the new AMI to copy. (As of 2.3 the default is C(default), in prior versions it was C(null).)
default: "default"
type: str
description:
Expand All @@ -38,20 +38,22 @@
description:
- Whether or not the destination snapshots of the copied AMI should be encrypted.
type: bool
default: false
kms_key_id:
description:
- KMS key id used to encrypt the image. If not specified, uses default EBS Customer Master Key (CMK) for your account.
type: str
wait:
description:
- Wait for the copied AMI to be in state 'available' before returning.
- Wait for the copied AMI to be in state C(available) before returning.
type: bool
default: 'no'
wait_timeout:
description:
- How long before wait gives up, in seconds. Prior to 2.3 the default was 1200.
- How long before wait gives up, in seconds.
- Prior to 2.3 the default was C(1200).
- From 2.3-2.5 this option was deprecated in favor of boto3 waiter defaults.
This was reenabled in 2.6 to allow timeouts greater than 10 minutes.
- This was reenabled in 2.6 to allow timeouts greater than 10 minutes.
default: 600
type: int
tags:
Expand Down
21 changes: 11 additions & 10 deletions plugins/modules/ec2_vpc_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
connection_type:
description:
- The type of VPN connection.
- At this time only 'ipsec.1' is supported.
- At this time only C(ipsec.1) is supported.
default: ipsec.1
type: str
vpn_gateway_id:
Expand Down Expand Up @@ -63,8 +63,8 @@
required: no
tunnel_options:
description:
- An optional list object containing no more than two dict members, each of which may contain 'TunnelInsideCidr'
and/or 'PreSharedKey' keys with appropriate string values. AWS defaults will apply in absence of either of
- An optional list object containing no more than two dict members, each of which may contain I(TunnelInsideCidr)
and/or I(PreSharedKey) keys with appropriate string values. AWS defaults will apply in absence of either of
the aforementioned keys.
required: no
type: list
Expand All @@ -78,11 +78,11 @@
description: The pre-shared key (PSK) to establish initial authentication between the virtual private gateway and customer gateway.
filters:
description:
- An alternative to using vpn_connection_id. If multiple matches are found, vpn_connection_id is required.
- An alternative to using I(vpn_connection_id). If multiple matches are found, vpn_connection_id is required.
If one of the following suboptions is a list of items to filter by, only one item needs to match to find the VPN
that correlates. e.g. if the filter 'cidr' is ['194.168.2.0/24', '192.168.2.0/24'] and the VPN route only has the
destination cidr block of '192.168.2.0/24' it will be found with this filter (assuming there are not multiple
VPNs that are matched). Another example, if the filter 'vpn' is equal to ['vpn-ccf7e7ad', 'vpn-cb0ae2a2'] and one
that correlates. e.g. if the filter I(cidr) is C(['194.168.2.0/24', '192.168.2.0/24']) and the VPN route only has the
destination cidr block of C(192.168.2.0/24) it will be found with this filter (assuming there are not multiple
VPNs that are matched). Another example, if the filter I(vpn) is equal to C(['vpn-ccf7e7ad', 'vpn-cb0ae2a2']) and one
of of the VPNs has the state deleted (exists but is unmodifiable) and the other exists and is not deleted,
it will be found via this filter. See examples.
suboptions:
Expand All @@ -91,7 +91,7 @@
- The customer gateway configuration of the VPN as a string (in the format of the return value) or a list of those strings.
static-routes-only:
description:
- The type of routing; true or false.
- The type of routing; C(true) or C(false).
cidr:
description:
- The destination cidr of the VPN's route as a string or a list of those strings.
Expand Down Expand Up @@ -127,15 +127,16 @@
description:
- Whether or not to delete VPN connections routes that are not specified in the task.
type: bool
default: false
wait_timeout:
description:
- How long before wait gives up, in seconds.
- How long, in seconds, before wait gives up.
default: 600
type: int
required: false
delay:
description:
- The time to wait before checking operation again. in seconds.
- The time, in seconds, to wait before checking operation again.
required: false
type: int
default: 15
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/ecs_ecr.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
description:
- If yes, remove the policy from the repository.
- Alias C(delete_policy) has been deprecated and will be removed after 2022-06-01.
- Defaults to C(false).
required: false
default: false
type: bool
aliases: [ delete_policy ]
image_tag_mutability:
Expand All @@ -63,9 +63,9 @@
type: json
purge_lifecycle_policy:
description:
- if yes, remove the lifecycle policy from the repository.
- if C(true), remove the lifecycle policy from the repository.
- Defaults to C(false).
required: false
default: false
type: bool
state:
description:
Expand All @@ -76,7 +76,7 @@
type: str
scan_on_push:
description:
- if yes, images are scanned for known vulnerabilities after being pushed to the repository.
- if C(true), images are scanned for known vulnerabilities after being pushed to the repository.
- I(scan_on_push) requires botocore >= 1.13.3
required: false
default: false
Expand Down
Loading

0 comments on commit b22f280

Please sign in to comment.