File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ resource "null_resource" "nixos-remote" {
9
9
provisioner "local-exec" {
10
10
environment = merge ({
11
11
SSH_PRIVATE_KEY = var.ssh_private_key
12
+ SSH_PASS = var.target_pass
12
13
stop_after_disko = var.stop_after_disko
13
14
debug_logging = var.debug_logging
14
15
kexec_tarball_url = var.kexec_tarball_url
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ if [[ -n ${flake-} ]]; then
25
25
else
26
26
args+=(" --store-paths" " ${nixos_partitioner} " " ${nixos_system} " )
27
27
fi
28
+ if [[ ${SSH_PASS} ]]; then
29
+ args+=(" --env-password" )
30
+ fi
28
31
29
32
tmpdir=$( mktemp -d)
30
33
cleanup () {
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ variable "target_port" {
35
35
default = 22
36
36
}
37
37
38
+ variable "target_pass" {
39
+ type = string
40
+ description = " Password used to connect to the target_host"
41
+ default = null
42
+ }
43
+
38
44
variable "ssh_private_key" {
39
45
type = string
40
46
description = " Content of private key used to connect to the target_host"
You can’t perform that action at this time.
0 commit comments