I’m seeing different behavior between Ansible 1.8 and the devel branch when using the s3 module, specifically when there is a dot (“.”) in the bucket name. More details in this closed issue: https://github.com/ansible/ansible-modules-core/issues/1183
$ ansible -i ‘localhost,’ all -c local -m s3 -a “bucket=friendly.mouse mode=create”
The above example works with Ansible 1.8, and it produces an InvalidCertificateException with the devel branch. In both cases, I’m allowing the default behavior of “validate_certs=yes”.
My understanding is that S3 operations can use https://s3.amazonaws.com as the endpoint to avoid certificate issues with buckets with dots in the name. I think this can happen through boto’s OrdinaryCallingFormat, but I have not confirmed.
For comparison, here is partial output from an example in which I’m using aws-cli:
aws s3 mb s3://friendly.mice --debug # create a bucket
2015-04-21 13:00:08,821 - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [PUT]>
2015-04-21 13:00:08,821 - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): s3.amazonaws.com
2015-04-21 13:00:10,919 - botocore.vendored.requests.packages.urllib3.connectionpool - DEBUG - “PUT /friendly.mice HTTP/1.1” 200 0
I welcome any thoughts on what the correct behavior should be for the s3 module as well as any suggestions for how I can help to further isolate the difference in behavior.
-Baraa