Skip to content

Commit 0c0a1f5

Browse files
author
Martin Jackson
committed
Discover blockdevices and securitygroups for greater compatibility
1 parent 5a5c7ff commit 0c0a1f5

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

ansible/deploy_kubevirt_worker.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
gather_facts: false
88
vars:
99
kubeconfig: "{{ lookup('env', 'KUBECONFIG') }}"
10-
machineset_blockdevices:
11-
- ebs:
12-
iops: 0
13-
volumeSize: 120
14-
volumeType: gp2
1510
machineset_instance_type: m5.metal
1611
machineset_machine_role: worker
1712
machineset_machine_type: worker
@@ -47,6 +42,8 @@
4742
machineset_ami_id: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.ami.id }}"
4843
machineset_subnet: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.subnet.filters[0]['values'][0] }}"
4944
machineset_tags: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.tags }}"
45+
machineset_blockdevices: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.blockDevices }}"
46+
machineset_securitygroups: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.securityGroups }}"
5047
machineset_zone: "{{ cluster_machinesets.resources[0].spec.template.spec.providerSpec.value.placement.availabilityZone }}"
5148
infrastructure_name: "{{ cluster_info.resources[0].status.infrastructureName }}"
5249
infrastructure_region: "{{ cluster_info.resources[0].status.platformStatus.aws.region }}"
@@ -97,11 +94,7 @@
9794
placement:
9895
availabilityZone: "{{ machineset_zone }}"
9996
region: "{{ infrastructure_region }}"
100-
securityGroups:
101-
- filters:
102-
- name: tag:Name
103-
values:
104-
- "{{ infrastructure_name }}-worker-sg"
97+
securityGroups: {{ machineset_securitygroups }}
10598
subnet:
10699
filters:
107100
- name: tag:Name

0 commit comments

Comments
 (0)