Skip to content

Commit

Permalink
ecs_service and ecs_service_info: add name and service aliases (ansib…
Browse files Browse the repository at this point in the history
…le-collections#1187)

ecs_service and ecs_service_info: add name and service aliases

SUMMARY
while ecs_service is using name for the service name parameter, ecs_service_info is using service for the same purpose.
this PR adds just aliases to both modules, to use the same parameter to address the ecs service name.
ref ansible-collections#1142
ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request

COMPONENT NAME
ecs_service
ecs_service_info

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Joseph Torcasso <None>
Reviewed-by: Mark Chappell <None>
  • Loading branch information
markuman authored and abikouo committed Sep 18, 2023
1 parent 0d66fa5 commit 48833b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ecs_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- The name of the service.
required: true
type: str
aliases: ['service']
cluster:
description:
- The name of the cluster in which the service exists.
Expand Down Expand Up @@ -662,7 +663,7 @@ def health_check_setable(self, params):
def main():
argument_spec = dict(
state=dict(required=True, choices=['present', 'absent', 'deleting']),
name=dict(required=True, type='str'),
name=dict(required=True, type='str', aliases=['service']),
cluster=dict(required=False, type='str'),
task_definition=dict(required=False, type='str'),
load_balancers=dict(required=False, default=[], type='list', elements='dict'),
Expand Down
3 changes: 2 additions & 1 deletion ecs_service_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
required: false
type: list
elements: str
aliases: ['name']
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
Expand Down Expand Up @@ -214,7 +215,7 @@ def main():
details=dict(type='bool', default=False),
events=dict(type='bool', default=True),
cluster=dict(),
service=dict(type='list', elements='str')
service=dict(type='list', elements='str', aliases=['name'])
)

module = AnsibleAWSModule(argument_spec=argument_spec, supports_check_mode=True)
Expand Down

0 comments on commit 48833b4

Please sign in to comment.