Skip to content

Commit 14c5cd5

Browse files
author
Matt Pryor
authored
Make block device detection work on ESXi
1 parent 969c6f2 commit 14c5cd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ansible/roles/cluster_infra/templates/resources.tf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ resource "openstack_compute_instance_v2" "control" {
455455
{%- endif %}
456456
bootcmd:
457457
%{for volume in [openstack_blockstorage_volume_v3.state, {% if not cluster_home_manila_share | bool %} openstack_blockstorage_volume_v3.home {% endif %}]}
458-
- BLKDEV=$(readlink -f $(ls /dev/disk/by-id/*${substr(volume.id, 0, 20)}* | head -n1 )); blkid -o value -s TYPE $BLKDEV || mke2fs -t ext4 -L ${lower(split(" ", volume.description)[0])} $BLKDEV
458+
- BLKDEV=$(readlink -f $(ls /dev/disk/by-id/*${replace(substr(volume.id, 0, 20), "-", "*")}* | head -n1 )); blkid -o value -s TYPE $BLKDEV || mke2fs -t ext4 -L ${lower(split(" ", volume.description)[0])} $BLKDEV
459459
%{endfor}
460460
mounts:
461461
- [LABEL=state, {{ appliances_state_dir }}, auto]

0 commit comments

Comments
 (0)