Change s3 to use connect_to_region
* Allows us to use Ansible/s3 for GovCloud when accessing a pre-existing bucket
This commit is contained in:
parent
58534d0c71
commit
60e2e43f00
1 changed files with 2 additions and 1 deletions
|
@ -339,7 +339,8 @@ def main():
|
||||||
module.fail_json(msg = str(e))
|
module.fail_json(msg = str(e))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
s3 = boto.connect_s3(aws_access_key, aws_secret_key)
|
from boto.s3.connection import OrdinaryCallingFormat
|
||||||
|
s3 = boto.s3.connect_to_region(location, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, is_secure=True, calling_format=OrdinaryCallingFormat())
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
module.fail_json(msg = str(e))
|
module.fail_json(msg = str(e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue