Skip to content

Commit

Permalink
fix: Updating placement group restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfortin committed Oct 24, 2023
1 parent 0c157c3 commit b157bf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/modules/ec2_placement_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ def validate_params(
spread_level=None,
**_,
):
if (strategy == 'partition') ^ (partition_count is None):
if (strategy == 'partition' and partition_count is None) or (partition_count is not None and strategy != 'partition'):
module.fail_json("Specify partition count when using partition strategy.")

elif (strategy == "spread") ^ (spread_level is None):
elif (strategy == "spread" and spread_level is None) or (spread_level is not None and strategy != "spread"):
module.fail_json("You must define a spread level when using spread strategy.")


Expand Down

0 comments on commit b157bf3

Please sign in to comment.