From fcaa49b5366295bf78c11f5a2b2af312b01edc6f Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Tue, 2 May 2017 10:05:48 -0400 Subject: [PATCH] sns: move from notification directory to cloud/amazon directory - fixes #11874 (#23805) * move sns to cloud directory * make sns pep8 and remove from legacy files --- lib/ansible/modules/{notification => cloud/amazon}/sns.py | 4 ++-- test/sanity/pep8/legacy-files.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) rename lib/ansible/modules/{notification => cloud/amazon}/sns.py (98%) diff --git a/lib/ansible/modules/notification/sns.py b/lib/ansible/modules/cloud/amazon/sns.py similarity index 98% rename from lib/ansible/modules/notification/sns.py rename to lib/ansible/modules/cloud/amazon/sns.py index f6a92c31f56..d9090211172 100644 --- a/lib/ansible/modules/notification/sns.py +++ b/lib/ansible/modules/cloud/amazon/sns.py @@ -200,9 +200,9 @@ def main(): e = get_exception() module.fail_json(msg=str(e)) - if not message_structure=='string' and message_attributes: + if not message_structure == 'string' and message_attributes: module.fail_json(msg="when specifying message_attributes, the message_structure must be set to 'string'; otherwise the attributes will not be sent.") - elif message_structure=='string' and (email or sqs or sms or http or https): + elif message_structure == 'string' and (email or sqs or sms or http or https): module.fail_json(msg="do not specify non-default message formats when using the 'string' message_structure. they can only be used with " "the 'json' message_structure.") diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index e156e91d35e..f7f9af3144a 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -634,7 +634,6 @@ lib/ansible/modules/notification/pushover.py lib/ansible/modules/notification/rocketchat.py lib/ansible/modules/notification/sendgrid.py lib/ansible/modules/notification/slack.py -lib/ansible/modules/notification/sns.py lib/ansible/modules/notification/twilio.py lib/ansible/modules/packaging/language/bundler.py lib/ansible/modules/packaging/language/cpanm.py