Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamodb_table: use region derived from get_aws_connection_info #32557

Merged
merged 1 commit into from
Nov 3, 2017

Conversation

s-hertel
Copy link
Contributor

@s-hertel s-hertel commented Nov 3, 2017

SUMMARY

Region can be derived from a profile as well as module options. Use the region from get_aws_connection_info(). Fixes setting tags.

Fixes:

The full traceback is:
Traceback (most recent call last):
  File "/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py", line 490, in <module>
    main()
  File "/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py", line 484, in main
    create_or_update_dynamo_table(connection, module, boto3_dynamodb, boto3_sts)
  File "/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py", line 247, in create_or_update_dynamo_table
    ':table/' +
TypeError: Can't convert 'NoneType' object to str implicitly

fatal: [localhost]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py\", line 490, in <module>\n    main()\n  File \"/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py\", line 484, in main\n    create_or_update_dynamo_table(connection, module, boto3_dynamodb, boto3_sts)\n  File \"/var/folders/by/k8_fbl593dlctgqmwq5wzl2c0000gn/T/ansible_kues3ruy/ansible_module_dynamodb_table.py\", line 247, in create_or_update_dynamo_table\n    ':table/' +\nTypeError: Can't convert 'NoneType' object to str implicitly\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE",
    "rc": 0
}
	to retry, use: --limit @/Users/shertel/Workspace/ansible/my_playbooks/aws/dynamodb_table/make_table.retry

PLAY RECAP ************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/modules/cloud/amazon/dynamodb_table.py

ANSIBLE VERSION
2.5.0

@s-hertel s-hertel requested a review from ryansb November 3, 2017 20:05
@ansibot
Copy link
Contributor

ansibot commented Nov 3, 2017

cc @loia
click here for bot help

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 aws bugfix_pull_request cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. labels Nov 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 aws bug This issue/PR relates to a bug. cloud community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants