Multiple minor fixes (#58374)

* Documentation update
* Typo fixes
* fail_json fixes

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
pull/58387/head
Abhijeet Kasurde 6 years ago committed by ansibot
parent 77e01e6abc
commit 7d6f417f32

@ -34,7 +34,7 @@ options:
required: true
artifact_store:
description:
- Location information where articacts are stored (on S3). Dictionary with fields type and location.
- Location information where artifacts are stored (on S3). Dictionary with fields type and location.
required: true
suboptions:
type:
@ -71,13 +71,13 @@ extends_documentation_fragment:
EXAMPLES = '''
# Note: These examples do not set authentication details, see the AWS Guide for details.
# Example for creating a pipeline for continouos deploy of Github code to an ECS cluster (container)
# Example for creating a pipeline for continuous deploy of Github code to an ECS cluster (container)
- code_pipeline:
name: my_deploy_pipeline
role_arn: arn:aws:iam::123456:role/AWS-CodePipeline-Service
artifact_store:
type: S3
locatation: my_s3_codepipline_bucket
location: my_s3_codepipline_bucket
stages:
- name: Get_source
actions:
@ -159,7 +159,7 @@ pipeline:
type: complex
contains:
type:
desrciption: The type of the artifacts store, such as S3
description: The type of the artifacts store, such as S3
returned: always
type: string
sample: S3

@ -287,7 +287,7 @@ def release_address(ec2, address, check_mode):
# If we're in check mode, nothing else to do
if not check_mode:
if not address.release():
EIPException('release failed')
raise EIPException('release failed')
return {'changed': True}

@ -633,7 +633,7 @@ class PgHbaRule(dict):
return 1
if isinstance(sourceobj, str):
return 0
raise PgHbaValueError('This source {1} is of an unknown type...'.format(sourceobj))
raise PgHbaValueError('This source {0} is of an unknown type...'.format(sourceobj))
def db_weight(self):
"""Report the weight of the database.

@ -34,7 +34,7 @@ options:
type: 'str'
description:
- Desired state of the mediatype.
- On C(present), it will create a medatype if it does not exist or update the mediatype if the associated data is different.
- On C(present), it will create a mediatype if it does not exist or update the mediatype if the associated data is different.
- On C(absent), it will remove the mediatype if it exists.
choices:
- present
@ -131,7 +131,7 @@ options:
smtp_authentication:
type: 'bool'
description:
- Whether SMTP authetication with username and password should be enabled or not.
- Whether SMTP authentication with username and password should be enabled or not.
- If set to C(true), C(username) and C(password) should be specified.
default: false
smtp_security:
@ -476,7 +476,6 @@ def delete_mediatype(module, zbx, mediatype_id):
def update_mediatype(module, zbx, **kwargs):
try:
pass
mediatype_id = zbx.mediatype.update(kwargs)
except Exception as e:
module.fail_json(msg="Failed to update mediatype '{_id}': {e}".format(_id=kwargs['mediatypeid'], e=e))

@ -515,11 +515,11 @@ def main():
if mode == 'access' and state == 'present' and not access_vlan:
msg = 'access_vlan param required for mode=access && state=present'
module.fail_json(msg)
module.fail_json(msg=msg)
if mode == 'trunk' and access_vlan:
msg = 'access_vlan param not supported when using mode=trunk'
module.fail_json(msg)
module.fail_json(msg=msg)
if not is_switchport(name, module):
module.fail_json(msg='Ensure interface is configured to be a L2'
@ -538,7 +538,7 @@ def main():
# If there isn't an existing, something is wrong per previous comment
if not existing:
msg = 'Make sure you are using the FULL interface name'
module.fail_json(msg)
module.fail_json(msg=msg)
if trunk_vlans or trunk_allowed_vlans:
if trunk_vlans:

@ -154,7 +154,7 @@ def main():
unsubscribe_channels(channelname, client, session, systname, sys_id)
module.exit_json(changed=True, msg="Channel %s removed" % channelname)
except Exception as e:
module.fail_json('Unable to %s channel (%s): %s' % ('add' if state == 'present' else 'remove', channelname, to_text(e)))
module.fail_json(msg='Unable to %s channel (%s): %s' % ('add' if state == 'present' else 'remove', channelname, to_text(e)))
finally:
client.auth.logout(session)

@ -267,7 +267,7 @@ def main():
if module.check_mode:
cmd += " --noop"
if p['use_srv_records'] is not None:
if not ['use_srv_records']:
if not p['use_srv_records']:
cmd += " --no-use_srv_records"
else:
cmd += " --use_srv_records"

Loading…
Cancel
Save