From fd3868329d6e93850a1d2503d69388e07b07e2fc Mon Sep 17 00:00:00 2001 From: Jill R <4121322+jillr@users.noreply.github.com> Date: Wed, 25 Mar 2020 15:39:40 -0700 Subject: [PATCH] Rename collection (#12) * Rename core collection Rename references to ansible.amazon to amazon.aws. * Rename community.amazon to community.aws Fix pep8 line lengths for rewritten amazon.aws imports * Missed a path in shippable.sh * Dependency repos moved --- plugins/modules/ec2_instance.py | 24 +++++++++---------- plugins/modules/ec2_instance_info.py | 18 +++++++------- .../roles/ec2_instance/meta/main.yml | 2 +- .../roles/ec2_instance/tasks/main.yml | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/plugins/modules/ec2_instance.py b/plugins/modules/ec2_instance.py index ca090c13d7c..0b268a6f05a 100644 --- a/plugins/modules/ec2_instance.py +++ b/plugins/modules/ec2_instance.py @@ -278,8 +278,8 @@ type: str extends_documentation_fragment: -- ansible.amazon.aws -- ansible.amazon.ec2 +- amazon.aws.aws +- amazon.aws.ec2 ''' @@ -811,16 +811,16 @@ from ansible.module_utils.six import text_type, string_types from ansible.module_utils.six.moves.urllib import parse as urlparse from ansible.module_utils._text import to_bytes, to_native -import ansible_collections.ansible.amazon.plugins.module_utils.ec2 as ec2_utils -from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import (AWSRetry, - ansible_dict_to_boto3_filter_list, - compare_aws_tags, - boto3_tag_list_to_ansible_dict, - ansible_dict_to_boto3_tag_list, - camel_dict_to_snake_dict, - ) - -from ansible_collections.ansible.amazon.plugins.module_utils.aws.core import AnsibleAWSModule +import ansible_collections.amazon.aws.plugins.module_utils.ec2 as ec2_utils +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (AWSRetry, + ansible_dict_to_boto3_filter_list, + compare_aws_tags, + boto3_tag_list_to_ansible_dict, + ansible_dict_to_boto3_tag_list, + camel_dict_to_snake_dict, + ) + +from ansible_collections.amazon.aws.plugins.module_utils.aws.core import AnsibleAWSModule module = None diff --git a/plugins/modules/ec2_instance_info.py b/plugins/modules/ec2_instance_info.py index 865b7d70d06..9bb1ff56e7d 100644 --- a/plugins/modules/ec2_instance_info.py +++ b/plugins/modules/ec2_instance_info.py @@ -37,8 +37,8 @@ type: dict extends_documentation_fragment: -- ansible.amazon.aws -- ansible.amazon.ec2 +- amazon.aws.aws +- amazon.aws.ec2 ''' @@ -503,13 +503,13 @@ HAS_BOTO3 = False from ansible.module_utils.basic import AnsibleModule -from ansible_collections.ansible.amazon.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, - boto3_conn, - boto3_tag_list_to_ansible_dict, - camel_dict_to_snake_dict, - ec2_argument_spec, - get_aws_connection_info, - ) +from ansible_collections.amazon.aws.plugins.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, + boto3_conn, + boto3_tag_list_to_ansible_dict, + camel_dict_to_snake_dict, + ec2_argument_spec, + get_aws_connection_info, + ) def list_ec2_instances(connection, module): diff --git a/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml b/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml index 2545bb5c99a..77589cc2b48 100644 --- a/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml +++ b/tests/integration/targets/ec2_instance/roles/ec2_instance/meta/main.yml @@ -2,4 +2,4 @@ dependencies: - prepare_tests - setup_ec2 collections: - - ansible.amazon + - amazon.aws diff --git a/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml b/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml index d7ae6d0a3bf..188d97d2e9f 100644 --- a/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml +++ b/tests/integration/targets/ec2_instance/roles/ec2_instance/tasks/main.yml @@ -25,7 +25,7 @@ security_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - - ansible.amazon + - amazon.aws block: - debug: msg: "{{ inventory_hostname }} start: {{ lookup('pipe','date') }}"