|
|
|
@ -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')
|
|
|
|
|
|
|
|
|
|