Skip to content

Commit aff0119

Browse files
authored
Fix idempotence bug for dynamic inventory VMs (#99)
* Fix idempotence bug introduced when checking public IPs for dynamic inventory where filtering does not limit to just the dynamic inventory VMs Signed-off-by: Daniel Chaffelson <[email protected]>
1 parent ad68708 commit aff0119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/infrastructure/tasks/setup_aws_compute.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
amazon.aws.ec2_instance_info:
4747
region: "{{ infra__region }}"
4848
filters:
49-
"tag:Name": "{{ infra__namespace }}-*"
49+
"tag:Name": "{{ '-'.join([infra__namespace, infra__dynamic_inventory_vm_suffix, infra__dynamic_inventory_os[::2]]) }}-*"
5050
instance-state-name: [ "running" ]
5151
until: __infra_dynamic_inventory_instances.instances | selectattr('public_ip_address', 'defined') | list | count | int == infra__dynamic_inventory_count | int
5252
retries: 5

0 commit comments

Comments
 (0)