s3_sync: fix broken import (#31460)
This commit is contained in:
parent
83dec70ad8
commit
840a57a4ed
2 changed files with 11 additions and 2 deletions
|
@ -99,6 +99,7 @@ options:
|
|||
requirements:
|
||||
- boto3 >= 1.4.4
|
||||
- botocore
|
||||
- python-dateutil
|
||||
|
||||
author: tedder
|
||||
extends_documentation_fragment:
|
||||
|
@ -209,13 +210,18 @@ import mimetypes
|
|||
import os
|
||||
import stat as osstat # os.stat constants
|
||||
import traceback
|
||||
from dateutil import tz
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict, ec2_argument_spec, boto3_conn, get_aws_connection_info, HAS_BOTO3, boto_exception
|
||||
from ansible.module_utils._text import to_text
|
||||
|
||||
try:
|
||||
from dateutil import tz
|
||||
HAS_DATEUTIL = True
|
||||
except ImportError:
|
||||
HAS_DATEUTIL = False
|
||||
|
||||
try:
|
||||
import botocore
|
||||
except ImportError:
|
||||
|
@ -497,6 +503,10 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
)
|
||||
|
||||
if not HAS_DATEUTIL:
|
||||
module.fail_json(msg='dateutil required for this module')
|
||||
|
||||
if not HAS_BOTO3:
|
||||
module.fail_json(msg='boto3 required for this module')
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
lib/ansible/modules/cloud/amazon/cloudtrail.py
|
||||
lib/ansible/modules/cloud/amazon/ec2_win_password.py
|
||||
lib/ansible/modules/cloud/amazon/s3_sync.py
|
||||
lib/ansible/modules/cloud/azure/azure.py
|
||||
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
|
||||
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py
|
||||
|
|
Loading…
Reference in a new issue