Add missing msg in fail_json (#33543)
This fix adds msg keyword in fail_json in aws_acm_facts, cs_host, junos_package module. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
5087ce9273
commit
807bebaa1f
3 changed files with 3 additions and 3 deletions
|
@ -313,7 +313,7 @@ def main():
|
||||||
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
|
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
|
||||||
|
|
||||||
if not HAS_BOTO3:
|
if not HAS_BOTO3:
|
||||||
module.fail_json('boto3 and botocore are required by this module')
|
module.fail_json(msg='boto3 and botocore are required by this module')
|
||||||
|
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
||||||
client = boto3_conn(module, conn_type='client', resource='acm',
|
client = boto3_conn(module, conn_type='client', resource='acm',
|
||||||
|
|
|
@ -577,7 +577,7 @@ class AnsibleCloudStackHost(AnsibleCloudStack):
|
||||||
return None
|
return None
|
||||||
elif host['resourcestate'] != 'PrepareForMaintenance':
|
elif host['resourcestate'] != 'PrepareForMaintenance':
|
||||||
return host
|
return host
|
||||||
self.fail_json("Polling for maintenance timed out")
|
self.fail_json(msg="Polling for maintenance timed out")
|
||||||
|
|
||||||
def get_result(self, host):
|
def get_result(self, host):
|
||||||
super(AnsibleCloudStackHost, self).get_result(host)
|
super(AnsibleCloudStackHost, self).get_result(host)
|
||||||
|
|
|
@ -136,7 +136,7 @@ def connect(module):
|
||||||
device.timeout = get_param(module, 'timeout') or 10
|
device.timeout = get_param(module, 'timeout') or 10
|
||||||
except ConnectError:
|
except ConnectError:
|
||||||
exc = get_exception()
|
exc = get_exception()
|
||||||
module.fail_json('unable to connect to %s: %s' % (host, str(exc)))
|
module.fail_json(msg='unable to connect to %s: %s' % (host, str(exc)))
|
||||||
|
|
||||||
return device
|
return device
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue