mirror of
https://github.com/khuedoan/homelab.git
synced 2025-03-10 04:47:09 +07:00
Use SSH key path instead of the key content
This commit is contained in:
parent
67428587b2
commit
611d11ace3
@ -3,9 +3,9 @@ provider "rke" {
|
||||
}
|
||||
|
||||
locals {
|
||||
hosts = yamldecode(file("../metal/hosts.yml"))
|
||||
user = local.hosts.metal.vars.ansible_user
|
||||
ssh_key = file(local.hosts.metal.vars.ansible_ssh_private_key_file)
|
||||
hosts = yamldecode(file("../metal/hosts.yml"))
|
||||
user = local.hosts.metal.vars.ansible_user
|
||||
ssh_key_path = local.hosts.metal.vars.ansible_ssh_private_key_file
|
||||
}
|
||||
|
||||
resource "rke_cluster" "cluster" {
|
||||
@ -24,7 +24,7 @@ resource "rke_cluster" "cluster" {
|
||||
"etcd",
|
||||
"worker"
|
||||
]
|
||||
ssh_key = local.ssh_key
|
||||
ssh_key_path = local.ssh_key_path
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ resource "rke_cluster" "cluster" {
|
||||
role = [
|
||||
"worker"
|
||||
]
|
||||
ssh_key = local.ssh_key
|
||||
ssh_key_path = local.ssh_key_path
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user