diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2016-04-13 19:37:56 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2016-04-13 19:37:56 -0700 |
commit | 78365e206fc1eaf69e683fffa87efcaa735e18d4 (patch) | |
tree | 3996b55b62089689a83f6d644975fa9f7630fa2b /lib | |
parent | 2163a24a12f6dd8d1be6525bcda2370838ed1030 (diff) | |
parent | f438c074af6e52178006523a3059355ea0f6ac17 (diff) | |
download | ansible-78365e206fc1eaf69e683fffa87efcaa735e18d4.tar.gz |
Merge pull request #15059 from willthames/remove_boto_ec2_requirement
Remove need for unnecessary boto.ec2 import
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/module_utils/ec2.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/ansible/module_utils/ec2.py b/lib/ansible/module_utils/ec2.py index d966429a8c..8b932424a2 100644 --- a/lib/ansible/module_utils/ec2.py +++ b/lib/ansible/module_utils/ec2.py @@ -92,10 +92,6 @@ def ec2_argument_spec(): return spec -def boto_supports_profile_name(): - return hasattr(boto.ec2.EC2Connection, 'profile_name') - - def get_aws_connection_info(module, boto3=False): # Check module args for credentials, then check environment vars @@ -179,15 +175,11 @@ def get_aws_connection_info(module, boto3=False): aws_secret_access_key=secret_key, security_token=security_token) - # profile_name only works as a key in boto >= 2.24 - # so only set profile_name if passed as an argument + # only set profile_name if passed as an argument if profile_name: - if not boto_supports_profile_name(): - module.fail_json("boto does not support profile_name before 2.24") boto_params['profile_name'] = profile_name - if HAS_LOOSE_VERSION and LooseVersion(boto.Version) >= LooseVersion("2.6.0"): - boto_params['validate_certs'] = validate_certs + boto_params['validate_certs'] = validate_certs for param, value in boto_params.items(): if isinstance(value, str): |