mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 03:10:22 -07:00
Fix module issues (#52209)
This commit is contained in:
parent
cedd9d9926
commit
203caf2570
54 changed files with 290 additions and 238 deletions
|
@ -444,24 +444,24 @@ def create_scaling_policy(connection, module):
|
|||
|
||||
def main():
|
||||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
state=dict(required=True, choices=['present', 'absent'], type='str'),
|
||||
policy_name=dict(required=True, type='str'),
|
||||
service_namespace=dict(required=True, choices=['ecs', 'elasticmapreduce', 'ec2', 'appstream', 'dynamodb'], type='str'),
|
||||
resource_id=dict(required=True, type='str'),
|
||||
scalable_dimension=dict(required=True, choices=['ecs:service:DesiredCount',
|
||||
'ec2:spot-fleet-request:TargetCapacity',
|
||||
'elasticmapreduce:instancegroup:InstanceCount',
|
||||
'appstream:fleet:DesiredCapacity',
|
||||
'dynamodb:table:ReadCapacityUnits',
|
||||
'dynamodb:table:WriteCapacityUnits',
|
||||
'dynamodb:index:ReadCapacityUnits',
|
||||
'dynamodb:index:WriteCapacityUnits'
|
||||
], type='str'),
|
||||
policy_type=dict(required=True, choices=['StepScaling', 'TargetTrackingScaling'], type='str'),
|
||||
step_scaling_policy_configuration=dict(required=False, type='dict'),
|
||||
argument_spec.update(
|
||||
state=dict(type='str', required=True, choices=['present', 'absent']),
|
||||
policy_name=dict(type='str', required=True),
|
||||
service_namespace=dict(type='str', required=True, choices=['appstream', 'dynamodb', 'ec2', 'ecs', 'elasticmapreduce']),
|
||||
resource_id=dict(type='str', required=True),
|
||||
scalable_dimension=dict(type='str',
|
||||
required=True,
|
||||
choices=['ecs:service:DesiredCount',
|
||||
'ec2:spot-fleet-request:TargetCapacity',
|
||||
'elasticmapreduce:instancegroup:InstanceCount',
|
||||
'appstream:fleet:DesiredCapacity',
|
||||
'dynamodb:table:ReadCapacityUnits',
|
||||
'dynamodb:table:WriteCapacityUnits',
|
||||
'dynamodb:index:ReadCapacityUnits',
|
||||
'dynamodb:index:WriteCapacityUnits']),
|
||||
policy_type=dict(type='str', required=True, choices=['StepScaling', 'TargetTrackingScaling']),
|
||||
step_scaling_policy_configuration=dict(type='dict'),
|
||||
target_tracking_scaling_policy_configuration=dict(
|
||||
required=False,
|
||||
type='dict',
|
||||
options=dict(
|
||||
CustomizedMetricSpecification=dict(type='dict'),
|
||||
|
@ -472,10 +472,10 @@ def main():
|
|||
TargetValue=dict(type='float'),
|
||||
)
|
||||
),
|
||||
minimum_tasks=dict(required=False, type='int'),
|
||||
maximum_tasks=dict(required=False, type='int'),
|
||||
override_task_capacity=dict(required=False, type=bool)
|
||||
))
|
||||
minimum_tasks=dict(type='int'),
|
||||
maximum_tasks=dict(type='int'),
|
||||
override_task_capacity=dict(type='bool'),
|
||||
)
|
||||
|
||||
module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
|
||||
|
||||
|
|
|
@ -25,115 +25,127 @@ options:
|
|||
state:
|
||||
description:
|
||||
- Create or destroy the ELB
|
||||
choices: ["present", "absent"]
|
||||
type: str
|
||||
choices: [ absent, present ]
|
||||
required: true
|
||||
name:
|
||||
description:
|
||||
- The name of the ELB
|
||||
type: str
|
||||
required: true
|
||||
listeners:
|
||||
description:
|
||||
- List of ports/protocols for this ELB to listen on (see example)
|
||||
required: false
|
||||
type: list
|
||||
purge_listeners:
|
||||
description:
|
||||
- Purge existing listeners on ELB that are not found in listeners
|
||||
type: bool
|
||||
default: 'yes'
|
||||
default: yes
|
||||
instance_ids:
|
||||
description:
|
||||
- List of instance ids to attach to this ELB
|
||||
type: bool
|
||||
default: 'no'
|
||||
type: list
|
||||
version_added: "2.1"
|
||||
purge_instance_ids:
|
||||
description:
|
||||
- Purge existing instance ids on ELB that are not found in instance_ids
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: no
|
||||
version_added: "2.1"
|
||||
zones:
|
||||
description:
|
||||
- List of availability zones to enable on this ELB
|
||||
required: false
|
||||
type: list
|
||||
purge_zones:
|
||||
description:
|
||||
- Purge existing availability zones on ELB that are not found in zones
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: no
|
||||
security_group_ids:
|
||||
description:
|
||||
- A list of security groups to apply to the elb
|
||||
type: list
|
||||
version_added: "1.6"
|
||||
security_group_names:
|
||||
description:
|
||||
- A list of security group names to apply to the elb
|
||||
type: list
|
||||
version_added: "2.0"
|
||||
health_check:
|
||||
description:
|
||||
- An associative array of health check configuration settings (see example)
|
||||
type: dict
|
||||
access_logs:
|
||||
description:
|
||||
- An associative array of access logs configuration settings (see example)
|
||||
type: dict
|
||||
version_added: "2.0"
|
||||
subnets:
|
||||
description:
|
||||
- A list of VPC subnets to use when creating ELB. Zones should be empty if using this.
|
||||
type: list
|
||||
version_added: "1.7"
|
||||
purge_subnets:
|
||||
description:
|
||||
- Purge existing subnet on ELB that are not found in subnets
|
||||
default: 'no'
|
||||
version_added: "1.7"
|
||||
type: bool
|
||||
default: no
|
||||
version_added: "1.7"
|
||||
scheme:
|
||||
description:
|
||||
- The scheme to use when creating the ELB. For a private VPC-visible ELB use 'internal'.
|
||||
If you choose to update your scheme with a different value the ELB will be destroyed and
|
||||
recreated. To update scheme you must use the option wait.
|
||||
type: str
|
||||
choices: ["internal", "internet-facing"]
|
||||
default: 'internet-facing'
|
||||
version_added: "1.7"
|
||||
validate_certs:
|
||||
description:
|
||||
- When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
|
||||
- When set to C(no), SSL certificates will not be validated for boto versions >= 2.6.0.
|
||||
type: bool
|
||||
default: 'yes'
|
||||
default: yes
|
||||
version_added: "1.5"
|
||||
connection_draining_timeout:
|
||||
description:
|
||||
- Wait a specified timeout allowing connections to drain before terminating an instance
|
||||
type: int
|
||||
version_added: "1.8"
|
||||
idle_timeout:
|
||||
description:
|
||||
- ELB connections from clients and to servers are timed out after this amount of time
|
||||
type: int
|
||||
version_added: "2.0"
|
||||
cross_az_load_balancing:
|
||||
description:
|
||||
- Distribute load across all configured Availability Zones
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: no
|
||||
version_added: "1.8"
|
||||
stickiness:
|
||||
description:
|
||||
- An associative array of stickiness policy settings. Policy will be applied to all listeners ( see example )
|
||||
type: dict
|
||||
version_added: "2.0"
|
||||
wait:
|
||||
description:
|
||||
- When specified, Ansible will check the status of the load balancer to ensure it has been successfully
|
||||
removed from AWS.
|
||||
type: bool
|
||||
default: 'no'
|
||||
default: no
|
||||
version_added: "2.1"
|
||||
wait_timeout:
|
||||
description:
|
||||
- Used in conjunction with wait. Number of seconds to wait for the elb to be terminated.
|
||||
A maximum of 600 seconds (10 minutes) is allowed.
|
||||
type: int
|
||||
default: 60
|
||||
version_added: "2.1"
|
||||
tags:
|
||||
description:
|
||||
- An associative array of tags. To delete all tags, supply an empty dict.
|
||||
type: dict
|
||||
version_added: "2.1"
|
||||
|
||||
extends_documentation_fragment:
|
||||
|
|
|
@ -80,7 +80,7 @@ options:
|
|||
geo_mapping:
|
||||
description:
|
||||
- The list of countries/regions mapped to this endpoint when traffic manager profile has routing_method of C(geographic).
|
||||
type: str
|
||||
type: list
|
||||
state:
|
||||
description:
|
||||
- Assert the state of the Traffic Manager endpoint. Use C(present) to create or update a Traffic Manager endpoint and C(absent) to delete it.
|
||||
|
|
|
@ -167,12 +167,12 @@ class AzureRMWebAppFacts(AzureRMModuleBase):
|
|||
name=dict(type='str'),
|
||||
resource_group=dict(type='str'),
|
||||
tags=dict(type='list'),
|
||||
return_publish_profile=dict(type=bool, default=False)
|
||||
return_publish_profile=dict(type='bool', default=False),
|
||||
)
|
||||
|
||||
self.results = dict(
|
||||
changed=False,
|
||||
webapps=[]
|
||||
webapps=[],
|
||||
)
|
||||
|
||||
self.name = None
|
||||
|
|
|
@ -248,7 +248,7 @@ swap_spec = dict(
|
|||
type='str'
|
||||
),
|
||||
preserve_vnet=dict(
|
||||
type=bool,
|
||||
type='bool',
|
||||
default=True
|
||||
)
|
||||
)
|
||||
|
|
|
@ -99,8 +99,7 @@ options:
|
|||
description:
|
||||
- Name of the new cloned server. This is only used when state is
|
||||
clone.
|
||||
type: bool
|
||||
default: 'no'
|
||||
type: str
|
||||
version_added: "2.0"
|
||||
clone_snapshot:
|
||||
choices:
|
||||
|
|
|
@ -235,16 +235,16 @@ def core(module):
|
|||
|
||||
def main():
|
||||
argument_spec = scaleway_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
state=dict(default='present', choices=['absent', 'present']),
|
||||
region=dict(required=True, choices=SCALEWAY_LOCATION.keys()),
|
||||
protocol=dict(required=True, choices=['TCP', 'UDP', 'ICMP']),
|
||||
port=dict(required=True, type=int),
|
||||
ip_range=dict(default='0.0.0.0/0', type=lambda x: to_text(ip_network(to_text(x)))),
|
||||
direction=dict(required=True, choices=['inbound', 'outbound']),
|
||||
action=dict(required=True, choices=['accept', 'drop']),
|
||||
security_group=dict(required=True),
|
||||
))
|
||||
argument_spec.update(
|
||||
state=dict(type='str', default='present', choices=['absent', 'present']),
|
||||
region=dict(type='str', required=True, choices=SCALEWAY_LOCATION.keys()),
|
||||
protocol=dict(type='str', required=True, choices=['TCP', 'UDP', 'ICMP']),
|
||||
port=dict(type='int', required=True),
|
||||
ip_range=dict(type='str', default='0.0.0.0/0'),
|
||||
direction=dict(type='str', required=True, choices=['inbound', 'outbound']),
|
||||
action=dict(type='str', required=True, choices=['accept', 'drop']),
|
||||
security_group=dict(type='str', required=True),
|
||||
)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
|
|
|
@ -60,7 +60,7 @@ options:
|
|||
description:
|
||||
- Determines if the portgroup should be present or not.
|
||||
required: True
|
||||
type: bool
|
||||
type: str
|
||||
choices:
|
||||
- 'present'
|
||||
- 'absent'
|
||||
|
|
|
@ -629,7 +629,7 @@ def main():
|
|||
uuid=dict(type='str'),
|
||||
folder=dict(type='str'),
|
||||
datacenter=dict(type='str', required=True),
|
||||
disk=dict(type=list, default=[]),
|
||||
disk=dict(type='list', default=[]),
|
||||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec,
|
||||
required_one_of=[['name', 'uuid']])
|
||||
|
|
|
@ -46,7 +46,7 @@ options:
|
|||
description:
|
||||
- "IP or FQDN of NTP server(s)."
|
||||
- This accepts a list of NTP servers. For multiple servers, please look at the examples.
|
||||
type: dict
|
||||
type: list
|
||||
required: True
|
||||
state:
|
||||
description:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue