Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #1187/029333b3 backport][stable-2] ecs_service and ecs_service_info: add name and service aliases #1192

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/0001-ecs-service-aliases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- ecs_service - add ``service`` alias to address the ecs service name with the same parameter as the ecs_service_info module is doing (https://github.com/ansible-collections/community.aws/pull/1187).
- ecs_service_info - add ``name`` alias to address the ecs service name with the same parameter as the ecs_service module is doing (https://github.com/ansible-collections/community.aws/pull/1187).
3 changes: 2 additions & 1 deletion plugins/modules/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 plugins/modules/ecs_service_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
required: false
type: list
elements: str
aliases: ['name']
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
Expand Down Expand Up @@ -216,7 +217,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