refactor: better ssh key names
This commit is contained in:
@@ -4,7 +4,7 @@ local-hostname: vm-host-naam
|
||||
users:
|
||||
- name: iac
|
||||
ssh-authorized-keys:
|
||||
- ${ssh-key}
|
||||
- ${azure-ssh-key}
|
||||
shell: /bin/bash
|
||||
|
||||
write_files:
|
||||
|
@@ -20,7 +20,7 @@ data "local_file" "azure_private_key" {
|
||||
data "template_file" "esxi_userdata" {
|
||||
template = file("${path.module}/userdata.tftpl")
|
||||
vars = {
|
||||
ssh-key = trimspace(data.local_file.ssh_key.content)
|
||||
skylab-ssh-key = trimspace(data.local_file.ssh_key.content)
|
||||
azure-private-key = indent(6, trimspace(data.local_file.azure_private_key.content))
|
||||
azure-vm-ip = azurerm_linux_virtual_machine.main.public_ip_address
|
||||
}
|
||||
@@ -151,7 +151,7 @@ resource "azurerm_network_interface_security_group_association" "main" {
|
||||
data "template_file" "azure_cloudinit" {
|
||||
template = file("${path.module}/cloudinit-azure.yaml")
|
||||
vars = {
|
||||
ssh-key = trimspace(data.azurerm_ssh_public_key.azure.public_key)
|
||||
azure-ssh-key = trimspace(data.azurerm_ssh_public_key.azure.public_key)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
users:
|
||||
- name: skylab
|
||||
ssh-authorized-keys:
|
||||
- ${ssh-key}
|
||||
- ${skylab-ssh-key}
|
||||
shell: /bin/bash
|
||||
sudo: ['ALL=(ALL) NOPASSWD:ALL']
|
||||
|
||||
|
Reference in New Issue
Block a user