Skip to content

Commit

Permalink
Further tweaking of test, trying to get instance_distribution setting…
Browse files Browse the repository at this point in the history
…s right
  • Loading branch information
stefanhorning committed Apr 13, 2022
1 parent fa0273c commit 7870d65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
dependencies:
- role: setup_botocore_pip
vars:
boto3_version: "1.20.27"
botocore_version: "1.23.27"
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@
ec2_launch_template:
template_name: "{{ resource_prefix }}-lt"
image_id: "{{ ec2_ami_image }}"
instance_type: t3.micro
credit_specification:
cpu_credits: standard
network_interfaces:
Expand Down Expand Up @@ -529,13 +528,21 @@
instance_requirements:
v_cpu_count: { min: 2, max: 8 }
memory_mi_b: { min: 1024, max: 4096 }
instances_distribution:
on_demand_allocation_strategy: lowest-price
on_demand_percentage_above_base_capacity: 0
spot_allocation_strategy: lowest-price
spot_instance_pools: 15 # only available when spot_allocation_strategy is 'lowest-price
wait_for_instances: yes
register: output

- assert:
that:
- output is changed
- "output.mixed_instances_policy.launch_template.overrides[0].instance_requirements == { memory_mi_b: { min: 1024, max: 4096 }, v_cpu_count: { min: 2, max: 8 } }"
- "output.mixed_instances_policy.instances_distribution.on_demand_percentage_above_base_capacity == 0"
- "output.mixed_instances_policy.instances_distribution.spot_allocation_strategy == 'lowest-price'"


# ============================================================

Expand Down

0 comments on commit 7870d65

Please sign in to comment.