From 9a4f1a68b5ffdce4778e36d8eae505881cc803f9 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 28 Jun 2022 10:30:33 +0200 Subject: [PATCH] Rename ses modules (#1264) Rename SES modules SUMMARY In line with what I understood to be the consensus on ansible-collections/amazon.aws#881 and ansible-collections/amazon.aws#610 Rename ses modules to remove the aws_ prefix. ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/aws_ses_identity.py plugins/modules/aws_ses_identity_policy.py plugins/modules/aws_ses_rule_set.py plugins/modules/ses_identity.py plugins/modules/ses_identity_policy.py plugins/modules/ses_rule_set.py ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis --- aws_ses_identity.py => ses_identity.py | 23 ++++++++++--------- ...entity_policy.py => ses_identity_policy.py | 23 +++++++++++-------- aws_ses_rule_set.py => ses_rule_set.py | 21 +++++++++-------- 3 files changed, 36 insertions(+), 31 deletions(-) rename aws_ses_identity.py => ses_identity.py (98%) rename aws_ses_identity_policy.py => ses_identity_policy.py (94%) rename aws_ses_rule_set.py => ses_rule_set.py (95%) diff --git a/aws_ses_identity.py b/ses_identity.py similarity index 98% rename from aws_ses_identity.py rename to ses_identity.py index caa250c220c..4f64b2be89b 100644 --- a/aws_ses_identity.py +++ b/ses_identity.py @@ -8,15 +8,17 @@ DOCUMENTATION = ''' --- -module: aws_ses_identity +module: ses_identity version_added: 1.0.0 short_description: Manages SES email and domain identity description: - This module allows the user to manage verified email and domain identity for SES. - This covers verifying and removing identities as well as setting up complaint, bounce and delivery notification settings. -author: Ed Costello (@orthanc) - + - Prior to release 5.0.0 this module was called C(community.aws.aws_ses_identity). + The usage did not change. +author: + - Ed Costello (@orthanc) options: identity: description: @@ -86,26 +88,25 @@ type: 'bool' default: True extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 ''' EXAMPLES = ''' # Note: These examples do not set authentication details, see the AWS Guide for details. - name: Ensure example@example.com email identity exists - community.aws.aws_ses_identity: + community.aws.ses_identity: identity: example@example.com state: present - name: Delete example@example.com email identity - community.aws.aws_ses_identity: + community.aws.ses_identity: email: example@example.com state: absent - name: Ensure example.com domain identity exists - community.aws.aws_ses_identity: + community.aws.ses_identity: identity: example.com state: present @@ -119,7 +120,7 @@ register: topic_info - name: Deliver feedback to topic instead of owner email - community.aws.aws_ses_identity: + community.aws.ses_identity: identity: example@example.com state: present complaint_notifications: @@ -140,7 +141,7 @@ register: topic_info - name: Delivery notifications to topic - community.aws.aws_ses_identity: + community.aws.ses_identity: identity: example@example.com state: present delivery_notifications: diff --git a/aws_ses_identity_policy.py b/ses_identity_policy.py similarity index 94% rename from aws_ses_identity_policy.py rename to ses_identity_policy.py index e7f9e9417e9..0b93921ec5a 100644 --- a/aws_ses_identity_policy.py +++ b/ses_identity_policy.py @@ -8,14 +8,18 @@ DOCUMENTATION = ''' --- -module: aws_ses_identity_policy +module: ses_identity_policy version_added: 1.0.0 short_description: Manages SES sending authorization policies description: - - This module allows the user to manage sending authorization policies associated with an SES identity (email or domain). + - This module allows the user to manage sending authorization policies associated with an SES + identity (email or domain). - SES authorization sending policies can be used to control what actors are able to send email on behalf of the validated identity and what conditions must be met by the sent emails. -author: Ed Costello (@orthanc) + - Prior to release 5.0.0 this module was called C(community.aws.aws_ses_identity_policy). + The usage did not change. +author: + - Ed Costello (@orthanc) options: identity: @@ -37,37 +41,36 @@ choices: [ 'present', 'absent' ] type: str extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 ''' EXAMPLES = ''' # Note: These examples do not set authentication details, see the AWS Guide for details. - name: add sending authorization policy to domain identity - community.aws.aws_ses_identity_policy: + community.aws.ses_identity_policy: identity: example.com policy_name: ExamplePolicy policy: "{{ lookup('template', 'policy.json.j2') }}" state: present - name: add sending authorization policy to email identity - community.aws.aws_ses_identity_policy: + community.aws.ses_identity_policy: identity: example@example.com policy_name: ExamplePolicy policy: "{{ lookup('template', 'policy.json.j2') }}" state: present - name: add sending authorization policy to identity using ARN - community.aws.aws_ses_identity_policy: + community.aws.ses_identity_policy: identity: "arn:aws:ses:us-east-1:12345678:identity/example.com" policy_name: ExamplePolicy policy: "{{ lookup('template', 'policy.json.j2') }}" state: present - name: remove sending authorization policy - community.aws.aws_ses_identity_policy: + community.aws.ses_identity_policy: identity: example.com policy_name: ExamplePolicy state: absent diff --git a/aws_ses_rule_set.py b/ses_rule_set.py similarity index 95% rename from aws_ses_rule_set.py rename to ses_rule_set.py index c87145eab5e..a16a0b2b047 100644 --- a/aws_ses_rule_set.py +++ b/ses_rule_set.py @@ -8,11 +8,13 @@ DOCUMENTATION = ''' --- -module: aws_ses_rule_set +module: ses_rule_set version_added: 1.0.0 short_description: Manages SES inbound receipt rule sets description: - - The M(community.aws.aws_ses_rule_set) module allows you to create, delete, and manage SES receipt rule sets + - This module allows you to create, delete, and manage SES receipt rule sets + - Prior to release 5.0.0 this module was called C(community.aws.aws_ses_rule_set). + The usage did not change. author: - "Ben Tomasik (@tomislacker)" - "Ed Costello (@orthanc)" @@ -44,9 +46,8 @@ required: False default: False extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 ''' EXAMPLES = """ @@ -54,29 +55,29 @@ # It is assumed that their matching environment variables are set. --- - name: Create default rule set and activate it if not already - community.aws.aws_ses_rule_set: + community.aws.ses_rule_set: name: default-rule-set state: present active: yes - name: Create some arbitrary rule set but do not activate it - community.aws.aws_ses_rule_set: + community.aws.ses_rule_set: name: arbitrary-rule-set state: present - name: Explicitly deactivate the default rule set leaving no active rule set - community.aws.aws_ses_rule_set: + community.aws.ses_rule_set: name: default-rule-set state: present active: no - name: Remove an arbitrary inactive rule set - community.aws.aws_ses_rule_set: + community.aws.ses_rule_set: name: arbitrary-rule-set state: absent - name: Remove an ruleset even if we have to first deactivate it to remove it - community.aws.aws_ses_rule_set: + community.aws.ses_rule_set: name: default-rule-set state: absent force: yes