Skip to content

Commit

Permalink
Add required=true for task_name
Browse files Browse the repository at this point in the history
Signed-off-by: Alina Buzachis <[email protected]>
  • Loading branch information
alinabuzachis committed Oct 5, 2023
1 parent 876c4ad commit 3fd23ce
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugins/modules/ec2_import_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- The name of the EC2 image import task.
type: str
aliases: ["name"]
required: true
architecture:
description:
- The architecture of the virtual machine.
Expand Down Expand Up @@ -408,16 +409,12 @@ def main():
usage_operation=dict(type="str"),
boot_mode=dict(type="str", choices=["legacy-bios", "uefi"]),
cancel_reason=dict(type="str"),
task_name=dict(type="str", aliases=["name"]),
task_name=dict(type="str", aliases=["name"], required=True),
)

module = AnsibleAWSModule(
argument_spec=argument_spec,
supports_check_mode=True,
required_if=[
["state", "absent", ["task_name"]],
["state", "present", ["task_name"]],
],
)

state = module.params.get("state")
Expand Down

0 comments on commit 3fd23ce

Please sign in to comment.