mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
PEP 8 W291 whitespace cleanup.
This commit is contained in:
@@ -157,7 +157,7 @@ def _get_ksclient(module, kwargs):
|
||||
auth_url=kwargs.get('auth_url'))
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Error authenticating to the keystone: %s " % e.message)
|
||||
return client
|
||||
return client
|
||||
|
||||
|
||||
def _get_endpoint(module, client, endpoint_type):
|
||||
@@ -186,7 +186,7 @@ def _glance_image_present(module, params, client):
|
||||
try:
|
||||
for image in client.images.list():
|
||||
if image.name == params['name']:
|
||||
return image.id
|
||||
return image.id
|
||||
return None
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Error in fetching image list: %s" % e.message)
|
||||
|
||||
@@ -337,7 +337,7 @@ def _add_floating_ip_from_pool(module, nova, server):
|
||||
if not pool_ips:
|
||||
try:
|
||||
new_ip = nova.floating_ips.create(pool)
|
||||
except Exception as e:
|
||||
except Exception as e:
|
||||
module.fail_json(msg = "Unable to create floating ip: %s" % (e.message))
|
||||
pool_ips.append(new_ip.ip)
|
||||
# Add to the main list
|
||||
|
||||
@@ -135,7 +135,7 @@ def main():
|
||||
if module.params['public_key'] and (module.params['public_key'] != key.public_key ):
|
||||
module.fail_json(msg = "name {} present but key hash not the same as offered. Delete key first.".format(key['name']))
|
||||
else:
|
||||
module.exit_json(changed = False, result = "Key present")
|
||||
module.exit_json(changed = False, result = "Key present")
|
||||
try:
|
||||
key = nova.keypairs.create(module.params['name'], module.params['public_key'])
|
||||
except Exception as e:
|
||||
|
||||
@@ -72,7 +72,7 @@ def main():
|
||||
clouds.append(cloud.config)
|
||||
module.exit_json(ansible_facts=dict(openstack=dict(clouds=clouds)))
|
||||
except exceptions.OpenStackConfigException as e:
|
||||
module.fail_json(msg=str(e))
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
@@ -96,7 +96,7 @@ openstack_projects:
|
||||
returned: always, but can be null
|
||||
type: complex
|
||||
contains:
|
||||
id:
|
||||
id:
|
||||
description: Unique UUID.
|
||||
returned: success
|
||||
type: string
|
||||
|
||||
Reference in New Issue
Block a user