diff options
Diffstat (limited to 'lib/ansible/modules/cloud/amazon/dynamodb_table.py')
-rw-r--r-- | lib/ansible/modules/cloud/amazon/dynamodb_table.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/ansible/modules/cloud/amazon/dynamodb_table.py b/lib/ansible/modules/cloud/amazon/dynamodb_table.py index 58386ff047..838af01878 100644 --- a/lib/ansible/modules/cloud/amazon/dynamodb_table.py +++ b/lib/ansible/modules/cloud/amazon/dynamodb_table.py @@ -223,7 +223,6 @@ def create_or_update_dynamo_table(connection, module, boto3_dynamodb=None, boto3 try: table = Table(table_name, connection=connection) - if dynamo_table_exists(table): result['changed'] = update_dynamo_table(table, throughput=throughput, check_mode=module.check_mode, global_indexes=global_indexes) else: @@ -349,7 +348,7 @@ def has_throughput_changed(table, new_throughput): return False return new_throughput['read'] != table.throughput['read'] or \ - new_throughput['write'] != table.throughput['write'] + new_throughput['write'] != table.throughput['write'] def get_schema_param(hash_key_name, hash_key_type, range_key_name, range_key_type): @@ -397,6 +396,7 @@ def validate_index(index, module): if index['type'] not in INDEX_TYPE_OPTIONS: module.fail_json(msg='%s is not a valid index type, must be one of %s' % (index['type'], INDEX_TYPE_OPTIONS)) + def get_indexes(all_indexes): indexes = [] global_indexes = [] @@ -429,7 +429,6 @@ def get_indexes(all_indexes): return indexes, global_indexes - def main(): argument_spec = ec2_argument_spec() argument_spec.update(dict( @@ -442,8 +441,8 @@ def main(): read_capacity=dict(default=1, type='int'), write_capacity=dict(default=1, type='int'), indexes=dict(default=[], type='list'), - tags = dict(type='dict'), - wait_for_active_timeout = dict(default=60, type='int'), + tags=dict(type='dict'), + wait_for_active_timeout=dict(default=60, type='int'), )) module = AnsibleModule( |