Skip to content

Commit

Permalink
Cleanup and move tasks (vs playbooks) in inventory tests (#1394)
Browse files Browse the repository at this point in the history
Cleanup and move tasks (vs playbooks) in inventory tests

SUMMARY
Inventory plugin tests currently mix "tasks" content in with playbooks, this triggers ansible-lint warnings.
ISSUE TYPE

Tests Pull Request

COMPONENT NAME
ec2_vpc_net
plugins/inventory/aws_ec2.py
plugins/inventory/aws_rds.py
ADDITIONAL INFORMATION
Spotted by work on #1393

Reviewed-by: Alina Buzachis
  • Loading branch information
tremble authored Mar 1, 2023
1 parent 5bdc8f5 commit bd8dd88
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 78 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/1394-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trivial:
- inventory tests - move tasks out of playbook director (https://github.com/ansible-collections/amazon.aws/pull/1394).
- ec2_vpc_net - remove unused import (https://github.com/ansible-collections/amazon.aws/pull/1394).
1 change: 0 additions & 1 deletion plugins/modules/ec2_vpc_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
from ansible.module_utils.common.dict_transformations import camel_dict_to_snake_dict

from ansible_collections.amazon.aws.plugins.module_utils.modules import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.botocore import is_boto3_error_message
from ansible_collections.amazon.aws.plugins.module_utils.retries import AWSRetry
from ansible_collections.amazon.aws.plugins.module_utils.transformation import ansible_dict_to_boto3_filter_list
from ansible_collections.amazon.aws.plugins.module_utils.tagging import ansible_dict_to_boto3_tag_list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
region: '{{ aws_region }}'

tasks:
- include_tasks: "{{ task }}.yml"
- include_tasks: "tasks/{{ task }}.yml"
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
- debug:
var: groups

- include_tasks: tear_down.yml
- include_tasks: tasks/tear_down.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
block:

# Create VPC, subnet, security group, and find image_id to create instance
- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory
- name: create a new host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Create VPC, subnet, security group, and find image_id to create instance

- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
block:

# Create VPC, subnet, security group, and find image_id to create instance
- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host
- name: create a new host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
block:

# Create VPC, subnet, security group, and find image_id to create instance
- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host
- name: create a new host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Create VPC, subnet, security group, and find image_id to create instance

- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory
- name: create a new host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Create VPC, subnet, security group, and find image_id to create instance

- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory
- name: create a new host (1/3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
block:

# Create VPC, subnet, security group, and find image_id to create instance
- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory
- name: create a new host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
block:

# Create VPC, subnet, security group, and find image_id to create instance
- include_tasks: setup.yml
- include_tasks: tasks/setup.yml

# Create new host, refresh inventory
- name: create a new host
Expand Down

This file was deleted.

0 comments on commit bd8dd88

Please sign in to comment.