update version, fix fail msgs

pull/18777/head
Mark Chance 9 years ago committed by Matt Clay
parent 9aa40a5826
commit a1429f868b

@ -25,7 +25,7 @@ notes:
for the ecs service, ecs.amazonaws.com) for the ecs service, ecs.amazonaws.com)
dependecies: dependecies:
- An IAM role must have been created - An IAM role must have been created
version_added: "0.9" version_added: "2.0"
options: options:
''' '''
@ -92,7 +92,7 @@ class EcsServiceManager:
module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file") module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file")
self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs) self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except boto.exception.NoAuthHandlerFound, e: except boto.exception.NoAuthHandlerFound, e:
self.module.fail_json(msg=str(e)) self.module.fail_json(msg="Can't authorize connection - "+str(e))
# def list_clusters(self): # def list_clusters(self):
# return self.client.list_clusters() # return self.client.list_clusters()
@ -190,7 +190,7 @@ def main():
try: try:
existing = service_mgr.describe_service(module.params['cluster'], module.params['name']) existing = service_mgr.describe_service(module.params['cluster'], module.params['name'])
except Exception, e: except Exception, e:
module.fail_json(msg=str(e)) module.fail_json(msg="Exception describing service '"+module.params['name']+"' in cluster '"+module.params['cluster']+"': "+str(e))
results = dict(changed=False ) results = dict(changed=False )
if module.params['state'] == 'present': if module.params['state'] == 'present':

@ -20,7 +20,7 @@ module: ecs_service_facts
short_description: list or describe services in ecs short_description: list or describe services in ecs
description: description:
- Lists or describes services in ecs. - Lists or describes services in ecs.
version_added: "0.9" version_added: "2.0"
options: options:
details: details:
description: description:
@ -28,13 +28,11 @@ options:
required: false required: false
default: 'false' default: 'false'
choices: ['true', 'false'] choices: ['true', 'false']
version_added: 1.9
cluster: cluster:
description: description:
- The cluster ARNS in which to list the services. - The cluster ARNS in which to list the services.
required: false required: false
default: 'default' default: 'default'
version_added: 1.9
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -103,7 +101,7 @@ class EcsServiceManager:
module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file") module.fail_json(msg="Region must be specified as a parameter, in EC2_REGION or AWS_REGION environment variables or in boto configuration file")
self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs) self.ecs = boto3_conn(module, conn_type='client', resource='ecs', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except boto.exception.NoAuthHandlerFound, e: except boto.exception.NoAuthHandlerFound, e:
self.module.fail_json(msg=str(e)) self.module.fail_json(msg="Can't authorize connection - "+str(e))
# def list_clusters(self): # def list_clusters(self):
# return self.client.list_clusters() # return self.client.list_clusters()

Loading…
Cancel
Save