From 25113b4a7c2e00f46ed2e73280300927689bed17 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Sat, 2 Jul 2022 21:17:59 +0200 Subject: [PATCH] Rename Glue jobs --- README.md | 5 +- changelogs/fragments/1300-rename-glue.yml | 4 + ... community.aws.glue_connection_module.rst} | 15 +- docs/community.aws.glue_crawler_module.rst | 820 ++++++++++++++++++ ....rst => community.aws.glue_job_module.rst} | 13 +- meta/runtime.yml | 12 + ..._glue_connection.py => glue_connection.py} | 21 +- .../{aws_glue_crawler.py => glue_crawler.py} | 21 +- .../modules/{aws_glue_job.py => glue_job.py} | 9 +- .../aliases | 0 .../meta/main.yml | 0 .../tasks/main.yml | 0 .../tasks/test_connection_jdbc.yml | 0 .../tasks/test_connection_network.yml | 0 .../aliases | 0 .../defaults/main.yml | 0 .../meta/main.yml | 0 .../tasks/main.yml | 0 .../{aws_glue_job => glue_job}/aliases | 0 .../defaults/main.yml | 0 .../{aws_glue_job => glue_job}/meta/main.yml | 0 .../{aws_glue_job => glue_job}/tasks/main.yml | 0 22 files changed, 879 insertions(+), 41 deletions(-) create mode 100644 changelogs/fragments/1300-rename-glue.yml rename docs/{community.aws.aws_glue_connection_module.rst => community.aws.glue_connection_module.rst} (98%) create mode 100644 docs/community.aws.glue_crawler_module.rst rename docs/{community.aws.aws_glue_job_module.rst => community.aws.glue_job_module.rst} (99%) rename plugins/modules/{aws_glue_connection.py => glue_connection.py} (97%) rename plugins/modules/{aws_glue_crawler.py => glue_crawler.py} (97%) rename plugins/modules/{aws_glue_job.py => glue_job.py} (99%) rename tests/integration/targets/{aws_glue_connection => glue_connection}/aliases (100%) rename tests/integration/targets/{aws_glue_connection => glue_connection}/meta/main.yml (100%) rename tests/integration/targets/{aws_glue_connection => glue_connection}/tasks/main.yml (100%) rename tests/integration/targets/{aws_glue_connection => glue_connection}/tasks/test_connection_jdbc.yml (100%) rename tests/integration/targets/{aws_glue_connection => glue_connection}/tasks/test_connection_network.yml (100%) rename tests/integration/targets/{aws_glue_crawler => glue_crawler}/aliases (100%) rename tests/integration/targets/{aws_glue_crawler => glue_crawler}/defaults/main.yml (100%) rename tests/integration/targets/{aws_glue_crawler => glue_crawler}/meta/main.yml (100%) rename tests/integration/targets/{aws_glue_crawler => glue_crawler}/tasks/main.yml (100%) rename tests/integration/targets/{aws_glue_job => glue_job}/aliases (100%) rename tests/integration/targets/{aws_glue_job => glue_job}/defaults/main.yml (100%) rename tests/integration/targets/{aws_glue_job => glue_job}/meta/main.yml (100%) rename tests/integration/targets/{aws_glue_job => glue_job}/tasks/main.yml (100%) diff --git a/README.md b/README.md index 48d55ad314a..c8e395d20d7 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,6 @@ Name | Description [community.aws.aws_config_recorder](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_config_recorder_module.rst)|Manage AWS Config Recorders [community.aws.aws_config_rule](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_config_rule_module.rst)|Manage AWS Config resources [community.aws.aws_elasticbeanstalk_app](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_elasticbeanstalk_app_module.rst)|Create, update, and delete an elastic beanstalk application -[community.aws.aws_glue_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_glue_connection_module.rst)|Manage an AWS Glue connection -[community.aws.aws_glue_job](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_glue_job_module.rst)|Manage an AWS Glue job [community.aws.aws_inspector_target](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_inspector_target_module.rst)|Create, Update and Delete Amazon Inspector Assessment Targets [community.aws.aws_msk_cluster](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_msk_cluster_module.rst)|Manage Amazon MSK clusters [community.aws.aws_msk_config](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_msk_config_module.rst)|Manage Amazon MSK cluster configurations. @@ -148,6 +146,9 @@ Name | Description [community.aws.elb_target_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_group_module.rst)|Manage a target group for an Application or Network load balancer [community.aws.elb_target_group_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_group_info_module.rst)|Gather information about ELB target groups in AWS [community.aws.elb_target_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.elb_target_info_module.rst)|Gathers which target groups a target is associated with. +[community.aws.glue_connection](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.glue_connection_module.rst)|Manage an AWS Glue connection +[community.aws.glue_crawler](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.glue_crawler_module.rst)|Manage an AWS Glue crawler +[community.aws.glue_job](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.glue_job_module.rst)|Manage an AWS Glue job [community.aws.iam_access_key](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_access_key_module.rst)|Manage AWS IAM User access keys [community.aws.iam_access_key_info](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_access_key_info_module.rst)|fetch information about AWS IAM User access keys [community.aws.iam_group](https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_group_module.rst)|Manage AWS IAM groups diff --git a/changelogs/fragments/1300-rename-glue.yml b/changelogs/fragments/1300-rename-glue.yml new file mode 100644 index 00000000000..7518bb7ee6a --- /dev/null +++ b/changelogs/fragments/1300-rename-glue.yml @@ -0,0 +1,4 @@ +minor_changes: +- aws_glue_connection - the ``aws_glue_connection`` module has been renamed to ``glue_connection``, ``aws_glue_connection`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1300). +- aws_glue_crawler - the ``aws_glue_crawler`` module has been renamed to ``glue_crawler``, ``aws_glue_crawler`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1300). +- aws_glue_job - the ``aws_glue_job`` module has been renamed to ``glue_job``, ``aws_glue_job`` remains as an alias (https://github.com/ansible-collections/community.aws/pull/1300). diff --git a/docs/community.aws.aws_glue_connection_module.rst b/docs/community.aws.glue_connection_module.rst similarity index 98% rename from docs/community.aws.aws_glue_connection_module.rst rename to docs/community.aws.glue_connection_module.rst index fb3777d3bad..15c5d9ef6a1 100644 --- a/docs/community.aws.aws_glue_connection_module.rst +++ b/docs/community.aws.glue_connection_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_glue_connection_module: +.. _community.aws.glue_connection_module: -********************************* -community.aws.aws_glue_connection -********************************* +***************************** +community.aws.glue_connection +***************************** **Manage an AWS Glue connection** @@ -18,6 +18,7 @@ Version added: 1.0.0 Synopsis -------- - Manage an AWS Glue connection. See https://aws.amazon.com/glue/ for details. +- Prior to release 5.0.0 this module was called ``community.aws.aws_glue_connection``. The usage did not change. @@ -404,7 +405,7 @@ Examples # Note: These examples do not set authentication details, see the AWS Guide for details. # Create an AWS Glue connection - - community.aws.aws_glue_connection: + - community.aws.glue_connection: name: my-glue-connection connection_properties: JDBC_CONNECTION_URL: jdbc:mysql://mydb:3306/databasename @@ -413,7 +414,7 @@ Examples state: present # Create an AWS Glue network connection - - community.aws.aws_glue_connection: + - community.aws.glue_connection: name: my-glue-network-connection availability_zone: us-east-1a connection_properties: @@ -426,7 +427,7 @@ Examples state: present # Delete an AWS Glue connection - - community.aws.aws_glue_connection: + - community.aws.glue_connection: name: my-glue-connection state: absent diff --git a/docs/community.aws.glue_crawler_module.rst b/docs/community.aws.glue_crawler_module.rst new file mode 100644 index 00000000000..8869433e663 --- /dev/null +++ b/docs/community.aws.glue_crawler_module.rst @@ -0,0 +1,820 @@ +.. _community.aws.glue_crawler_module: + + +************************** +community.aws.glue_crawler +************************** + +**Manage an AWS Glue crawler** + + +Version added: 4.1.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Manage an AWS Glue crawler. See https://aws.amazon.com/glue/ for details. +- Prior to release 5.0.0 this module was called ``community.aws.aws_glue_crawler``. The usage did not change. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- python >= 3.6 +- boto3 >= 1.17.0 +- botocore >= 1.20.0 + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ aws_access_key + +
+ string +
+
+ +
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
+
The aws_access_key and profile options are mutually exclusive.
+

aliases: ec2_access_key, access_key
+
+
+ aws_ca_bundle + +
+ path +
+
+ +
The location of a CA Bundle to use when validating SSL certificates.
+
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
+
+
+ aws_config + +
+ dictionary +
+
+ +
A dictionary to modify the botocore configuration.
+ +
+
+ aws_secret_key + +
+ string +
+
+ +
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
+
The aws_secret_key and profile options are mutually exclusive.
+

aliases: ec2_secret_key, secret_key
+
+
+ database_name + +
+ string +
+
+ +
The name of the database where results are written.
+
+
+ debug_botocore_endpoint_logs + +
+ boolean +
+
+
    Choices: +
  • no ←
  • +
  • yes
  • +
+
+
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
+
+
+ description + +
+ string +
+
+ +
Description of the crawler being defined.
+
+
+ ec2_url + +
+ string +
+
+ +
URL to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
+

aliases: aws_endpoint_url, endpoint_url
+
+
+ name + +
+ string + / required +
+
+ +
The name you assign to this crawler definition. It must be unique in your account.
+
+
+ profile + +
+ string +
+
+ +
The profile option is mutually exclusive with the aws_access_key, aws_secret_key and security_token options.
+

aliases: aws_profile
+
+
+ purge_tags + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
If purge_tags=true and tags is set, existing tags will be purged from the resource to match exactly what is defined by tags parameter.
+
If the tags parameter is not set then tags will not be modified, even if purge_tags=True.
+
Tag keys beginning with aws: are reserved by Amazon and can not be modified. As such they will be ignored for the purposes of the purge_tags parameter. See the Amazon documentation for more information https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions.
+
+
+ recrawl_policy + +
+ dictionary +
+
+ +
A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.
+
+
+ recrawl_behavior + +
+ string +
+
+ +
Specifies whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.
+
Supported options are CRAWL_EVERYTHING and CRAWL_NEW_FOLDERS_ONLY.
+
+
+ region + +
+ string +
+
+ +
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
+

aliases: aws_region, ec2_region
+
+
+ role + +
+ string +
+
+ +
The name or ARN of the IAM role associated with this crawler.
+
Required when state=present.
+
+
+ schema_change_policy + +
+ dictionary +
+
+ +
The policy for the crawler's update and deletion behavior.
+
+
+ delete_behavior + +
+ string +
+
+ +
Defines the deletion behavior when the crawler finds a deleted object.
+
Supported options are LOG, DELETE_FROM_DATABASE, and DEPRECATE_IN_DATABASE.
+
+
+ update_behavior + +
+ string +
+
+ +
Defines the update behavior when the crawler finds a changed schema..
+
Supported options are LOG and UPDATE_IN_DATABASE.
+
+
+ security_token + +
+ string +
+
+ +
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
+
The security_token and profile options are mutually exclusive.
+
Aliases aws_session_token and session_token have been added in version 3.2.0.
+

aliases: aws_session_token, session_token, aws_security_token, access_token
+
+
+ state + +
+ string + / required +
+
+
    Choices: +
  • present
  • +
  • absent
  • +
+
+
Create or delete the AWS Glue crawler.
+
+
+ table_prefix + +
+ string +
+
+ +
The table prefix used for catalog tables that are created.
+
+
+ tags + +
+ dictionary +
+
+ +
A dictionary representing the tags to be applied to the resource.
+
If the tags parameter is not set then tags will not be modified.
+

aliases: resource_tags
+
+
+ targets + +
+ dictionary +
+
+ +
A list of targets to crawl. See example below.
+
Required when state=present.
+
+
+ validate_certs + +
+ boolean +
+
+
    Choices: +
  • no
  • +
  • yes ←
  • +
+
+
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
+
+
+ + +Notes +----- + +.. note:: + - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION``, ``AWS_CA_BUNDLE`` + - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. + - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. + + + +Examples +-------- + +.. code-block:: yaml + + # Note: These examples do not set authentication details, see the AWS Guide for details. + + # Create an AWS Glue crawler + - community.aws.glue_crawler: + name: my-glue-crawler + database_name: my_database + role: my-iam-role + schema_change_policy: + delete_behavior: DELETE_FROM_DATABASE + update_behavior: UPDATE_IN_DATABASE + recrawl_policy: + recrawl_ehavior: CRAWL_EVERYTHING + targets: + S3Targets: + - Path: "s3://my-bucket/prefix/folder/" + ConnectionName: my-connection + Exclusions: + - "**.json" + - "**.yml" + state: present + + # Delete an AWS Glue crawler + - community.aws.glue_crawler: + name: my-glue-crawler + state: absent + + + +Return Values +------------- +Common return values are documented `here `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ creation_time + +
+ string +
+
when state is present +
The time and date that this crawler definition was created.
+
+
Sample:
+
2021-04-01T05:19:58.326000+00:00
+
+
+ database_name + +
+ string +
+
when state is present +
The name of the database where results are written.
+
+
Sample:
+
my_table
+
+
+ description + +
+ string +
+
when state is present +
Description of the crawler.
+
+
Sample:
+
My crawler
+
+
+ last_updated + +
+ string +
+
when state is present +
The time and date that this crawler definition was last updated.
+
+
Sample:
+
2021-04-01T05:19:58.326000+00:00
+
+
+ name + +
+ string +
+
always +
The name of the AWS Glue crawler.
+
+
Sample:
+
my-glue-crawler
+
+
+ recrawl_policy + +
+ complex +
+
when state is present +
A policy that specifies whether to crawl the entire dataset again, or to crawl only folders that were added since the last crawler run.
+
+
  +
+ RecrawlBehavior + +
+ string +
+
when state is present +
Whether to crawl the entire dataset again or to crawl only folders that were added since the last crawler run.
+
+
Sample:
+
CRAWL_EVERYTHING
+
+
+ role + +
+ string +
+
when state is present +
The name or ARN of the IAM role associated with this crawler.
+
+
Sample:
+
my-iam-role
+
+
+ schema_change_policy + +
+ complex +
+
when state is present +
The policy for the crawler's update and deletion behavior.
+
+
  +
+ DeleteBehavior + +
+ string +
+
when state is present +
The deletion behavior when the crawler finds a deleted object.
+
+
Sample:
+
DELETE_FROM_DATABASE
+
  +
+ UpdateBehavior + +
+ string +
+
when state is present +
The update behavior when the crawler finds a changed schema.
+
+
Sample:
+
UPDATE_IN_DATABASE
+
+
+ table_prefix + +
+ string +
+
when state is present +
The table prefix used for catalog tables that are created.
+
+
Sample:
+
my_prefix
+
+
+ targets + +
+ complex +
+
when state is present +
A list of targets to crawl.
+
+
  +
+ CatalogTargets + +
+ list +
+
when state is present +
List of catalog targets.
+
+
  +
+ DynamoDBTargets + +
+ list +
+
when state is present +
List of DynamoDB targets.
+
+
  +
+ JdbcTargets + +
+ list +
+
when state is present +
List of JDBC targets.
+
+
  +
+ MongoDBTargets + +
+ list +
+
when state is present +
List of Mongo DB targets.
+
+
  +
+ S3Targets + +
+ list +
+
when state is present +
List of S3 targets.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Ivan Chekaldin (@ichekaldin) diff --git a/docs/community.aws.aws_glue_job_module.rst b/docs/community.aws.glue_job_module.rst similarity index 99% rename from docs/community.aws.aws_glue_job_module.rst rename to docs/community.aws.glue_job_module.rst index ceff63bcefc..9db86c01b0b 100644 --- a/docs/community.aws.aws_glue_job_module.rst +++ b/docs/community.aws.glue_job_module.rst @@ -1,9 +1,9 @@ -.. _community.aws.aws_glue_job_module: +.. _community.aws.glue_job_module: -************************** -community.aws.aws_glue_job -************************** +********************** +community.aws.glue_job +********************** **Manage an AWS Glue job** @@ -18,6 +18,7 @@ Version added: 1.0.0 Synopsis -------- - Manage an AWS Glue job. See https://aws.amazon.com/glue/ for details. +- Prior to release 5.0.0 this module was called ``community.aws.aws_glue_job``. The usage did not change. @@ -532,7 +533,7 @@ Examples # Note: These examples do not set authentication details, see the AWS Guide for details. # Create an AWS Glue job - - community.aws.aws_glue_job: + - community.aws.glue_job: command_script_location: "s3://s3bucket/script.py" default_arguments: "--extra-py-files": s3://s3bucket/script-package.zip @@ -542,7 +543,7 @@ Examples state: present # Delete an AWS Glue job - - community.aws.aws_glue_job: + - community.aws.glue_job: name: my-glue-job state: absent diff --git a/meta/runtime.yml b/meta/runtime.yml index 10b917dcf9c..c0bedec30e0 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -141,6 +141,9 @@ action_groups: - elb_target_group_info - elb_target_info - execute_lambda + - glue_connection + - glue_crawler + - glue_job - iam_access_key - iam_access_key_info - iam_group @@ -260,6 +263,15 @@ plugin_routing: aws_eks_cluster: # Deprecation for this alias should not *start* prior to 2024-09-01 redirect: community.aws.eks_cluster + aws_glue_connection: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.glue_connection + aws_glue_crawler: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.glue_crawler + aws_glue_job: + # Deprecation for this alias should not *start* prior to 2024-09-01 + redirect: community.aws.glue_job aws_kms: # Deprecation for this alias should not *start* prior to 2024-09-01 redirect: community.aws.kms_key diff --git a/plugins/modules/aws_glue_connection.py b/plugins/modules/glue_connection.py similarity index 97% rename from plugins/modules/aws_glue_connection.py rename to plugins/modules/glue_connection.py index 07bdddd92ab..c8adb83fc66 100644 --- a/plugins/modules/aws_glue_connection.py +++ b/plugins/modules/glue_connection.py @@ -8,12 +8,15 @@ DOCUMENTATION = r''' --- -module: aws_glue_connection +module: glue_connection version_added: 1.0.0 short_description: Manage an AWS Glue connection description: - - Manage an AWS Glue connection. See U(https://aws.amazon.com/glue/) for details. -author: "Rob White (@wimnat)" + - Manage an AWS Glue connection. See U(https://aws.amazon.com/glue/) for details. + - Prior to release 5.0.0 this module was called C(community.aws.aws_glue_connection). + The usage did not change. +author: + - "Rob White (@wimnat)" options: availability_zone: description: @@ -69,16 +72,15 @@ - Required when I(connection_type=NETWORK). type: str extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 - + - amazon.aws.aws + - amazon.aws.ec2 ''' EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. # Create an AWS Glue connection -- community.aws.aws_glue_connection: +- community.aws.glue_connection: name: my-glue-connection connection_properties: JDBC_CONNECTION_URL: jdbc:mysql://mydb:3306/databasename @@ -87,7 +89,7 @@ state: present # Create an AWS Glue network connection -- community.aws.aws_glue_connection: +- community.aws.glue_connection: name: my-glue-network-connection availability_zone: us-east-1a connection_properties: @@ -100,10 +102,9 @@ state: present # Delete an AWS Glue connection -- community.aws.aws_glue_connection: +- community.aws.glue_connection: name: my-glue-connection state: absent - ''' RETURN = r''' diff --git a/plugins/modules/aws_glue_crawler.py b/plugins/modules/glue_crawler.py similarity index 97% rename from plugins/modules/aws_glue_crawler.py rename to plugins/modules/glue_crawler.py index 11ff1b63304..ffe6efd1636 100644 --- a/plugins/modules/aws_glue_crawler.py +++ b/plugins/modules/glue_crawler.py @@ -8,11 +8,13 @@ DOCUMENTATION = r''' --- -module: aws_glue_crawler +module: glue_crawler version_added: 4.1.0 short_description: Manage an AWS Glue crawler description: - - Manage an AWS Glue crawler. See U(https://aws.amazon.com/glue/) for details. + - Manage an AWS Glue crawler. See U(https://aws.amazon.com/glue/) for details. + - Prior to release 5.0.0 this module was called C(community.aws.aws_glue_crawler). + The usage did not change. author: - 'Ivan Chekaldin (@ichekaldin)' options: @@ -75,16 +77,16 @@ - Required when I(state=present). type: dict extends_documentation_fragment: -- amazon.aws.aws -- amazon.aws.ec2 -- amazon.aws.tags + - amazon.aws.aws + - amazon.aws.ec2 + - amazon.aws.tags ''' EXAMPLES = r''' # Note: These examples do not set authentication details, see the AWS Guide for details. # Create an AWS Glue crawler -- community.aws.aws_glue_crawler: +- community.aws.glue_crawler: name: my-glue-crawler database_name: my_database role: my-iam-role @@ -103,10 +105,9 @@ state: present # Delete an AWS Glue crawler -- community.aws.aws_glue_crawler: +- community.aws.glue_crawler: name: my-glue-crawler state: absent - ''' RETURN = r''' @@ -198,8 +199,6 @@ type: list ''' -# Non-ansible imports -import copy try: import botocore except ImportError: @@ -210,9 +209,7 @@ from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import ansible_dict_to_boto3_tag_list from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry -from ansible_collections.amazon.aws.plugins.module_utils.ec2 import boto3_tag_list_to_ansible_dict from ansible_collections.amazon.aws.plugins.module_utils.ec2 import compare_aws_tags from ansible_collections.amazon.aws.plugins.module_utils.iam import get_aws_account_info diff --git a/plugins/modules/aws_glue_job.py b/plugins/modules/glue_job.py similarity index 99% rename from plugins/modules/aws_glue_job.py rename to plugins/modules/glue_job.py index e95e9d69163..3fc2ba929fb 100644 --- a/plugins/modules/aws_glue_job.py +++ b/plugins/modules/glue_job.py @@ -8,11 +8,13 @@ DOCUMENTATION = r''' --- -module: aws_glue_job +module: glue_job version_added: 1.0.0 short_description: Manage an AWS Glue job description: - Manage an AWS Glue job. See U(https://aws.amazon.com/glue/) for details. + - Prior to release 5.0.0 this module was called C(community.aws.aws_glue_job). + The usage did not change. author: - "Rob White (@wimnat)" - "Vijayanand Sharma (@vijayanandsharma)" @@ -110,7 +112,7 @@ # Note: These examples do not set authentication details, see the AWS Guide for details. # Create an AWS Glue job -- community.aws.aws_glue_job: +- community.aws.glue_job: command_script_location: "s3://s3bucket/script.py" default_arguments: "--extra-py-files": s3://s3bucket/script-package.zip @@ -120,10 +122,9 @@ state: present # Delete an AWS Glue job -- community.aws.aws_glue_job: +- community.aws.glue_job: name: my-glue-job state: absent - ''' RETURN = r''' diff --git a/tests/integration/targets/aws_glue_connection/aliases b/tests/integration/targets/glue_connection/aliases similarity index 100% rename from tests/integration/targets/aws_glue_connection/aliases rename to tests/integration/targets/glue_connection/aliases diff --git a/tests/integration/targets/aws_glue_connection/meta/main.yml b/tests/integration/targets/glue_connection/meta/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_connection/meta/main.yml rename to tests/integration/targets/glue_connection/meta/main.yml diff --git a/tests/integration/targets/aws_glue_connection/tasks/main.yml b/tests/integration/targets/glue_connection/tasks/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_connection/tasks/main.yml rename to tests/integration/targets/glue_connection/tasks/main.yml diff --git a/tests/integration/targets/aws_glue_connection/tasks/test_connection_jdbc.yml b/tests/integration/targets/glue_connection/tasks/test_connection_jdbc.yml similarity index 100% rename from tests/integration/targets/aws_glue_connection/tasks/test_connection_jdbc.yml rename to tests/integration/targets/glue_connection/tasks/test_connection_jdbc.yml diff --git a/tests/integration/targets/aws_glue_connection/tasks/test_connection_network.yml b/tests/integration/targets/glue_connection/tasks/test_connection_network.yml similarity index 100% rename from tests/integration/targets/aws_glue_connection/tasks/test_connection_network.yml rename to tests/integration/targets/glue_connection/tasks/test_connection_network.yml diff --git a/tests/integration/targets/aws_glue_crawler/aliases b/tests/integration/targets/glue_crawler/aliases similarity index 100% rename from tests/integration/targets/aws_glue_crawler/aliases rename to tests/integration/targets/glue_crawler/aliases diff --git a/tests/integration/targets/aws_glue_crawler/defaults/main.yml b/tests/integration/targets/glue_crawler/defaults/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_crawler/defaults/main.yml rename to tests/integration/targets/glue_crawler/defaults/main.yml diff --git a/tests/integration/targets/aws_glue_crawler/meta/main.yml b/tests/integration/targets/glue_crawler/meta/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_crawler/meta/main.yml rename to tests/integration/targets/glue_crawler/meta/main.yml diff --git a/tests/integration/targets/aws_glue_crawler/tasks/main.yml b/tests/integration/targets/glue_crawler/tasks/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_crawler/tasks/main.yml rename to tests/integration/targets/glue_crawler/tasks/main.yml diff --git a/tests/integration/targets/aws_glue_job/aliases b/tests/integration/targets/glue_job/aliases similarity index 100% rename from tests/integration/targets/aws_glue_job/aliases rename to tests/integration/targets/glue_job/aliases diff --git a/tests/integration/targets/aws_glue_job/defaults/main.yml b/tests/integration/targets/glue_job/defaults/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_job/defaults/main.yml rename to tests/integration/targets/glue_job/defaults/main.yml diff --git a/tests/integration/targets/aws_glue_job/meta/main.yml b/tests/integration/targets/glue_job/meta/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_job/meta/main.yml rename to tests/integration/targets/glue_job/meta/main.yml diff --git a/tests/integration/targets/aws_glue_job/tasks/main.yml b/tests/integration/targets/glue_job/tasks/main.yml similarity index 100% rename from tests/integration/targets/aws_glue_job/tasks/main.yml rename to tests/integration/targets/glue_job/tasks/main.yml