Bug fixes for GCP modules (as of 2019-01-22T12:43:52-08:00) (#51248)

This commit is contained in:
Alex Stephen 2019-01-23 13:45:08 -08:00 committed by ansibot
parent 7ceffb7ba2
commit 6a3eaba52e

View file

@ -18,15 +18,14 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
################################################################################ ################################################################################
# Documentation # Documentation
################################################################################ ################################################################################
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ["preview"], 'supported_by': 'community'}
'status': ["preview"],
'supported_by': 'community'}
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
@ -145,7 +144,7 @@ def main():
overwrite=dict(type='bool'), overwrite=dict(type='bool'),
src=dict(type='path'), src=dict(type='path'),
dest=dict(type='path'), dest=dict(type='path'),
bucket=dict(type='str') bucket=dict(type='str'),
) )
) )
@ -277,7 +276,7 @@ def object_headers(module):
return { return {
"name": module.params['dest'], "name": module.params['dest'],
"Content-Type": mimetypes.guess_type(module.params['src'])[0], "Content-Type": mimetypes.guess_type(module.params['src'])[0],
"Content-Length": str(os.path.getsize(module.params['src'])) "Content-Length": str(os.path.getsize(module.params['src'])),
} }