mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Fix amazon extras modules to compile under python3
This commit is contained in:
committed by
Matt Clay
parent
46a1f73778
commit
3901fe72d3
@@ -172,6 +172,9 @@ try:
|
||||
except ImportError:
|
||||
HAS_BOTO3 = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ec2 import boto3_conn, ec2_argument_spec, get_aws_connection_info
|
||||
|
||||
|
||||
def get_hosted_zone(client, module):
|
||||
params = dict()
|
||||
@@ -413,8 +416,8 @@ def main():
|
||||
try:
|
||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
||||
route53 = boto3_conn(module, conn_type='client', resource='route53', region=region, endpoint=ec2_url, **aws_connect_kwargs)
|
||||
except boto.exception.NoAuthHandlerFound, e:
|
||||
module.fail_json(msg="Can't authorize connection - "+str(e))
|
||||
except boto.exception.NoAuthHandlerFound as e:
|
||||
module.fail_json(msg="Can't authorize connection - %s " % str(e))
|
||||
|
||||
invocations = {
|
||||
'change': change_details,
|
||||
@@ -428,9 +431,6 @@ def main():
|
||||
|
||||
module.exit_json(**results)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.ec2 import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user