mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-10-05 20:27:20 +03:00
terraform: add no-reboot option
This commit is contained in:
parent
bd3f79f11d
commit
2bc305e1cb
@ -29,6 +29,7 @@ module "install" {
|
||||
disk_encryption_key_scripts = var.disk_encryption_key_scripts
|
||||
extra_environment = var.extra_environment
|
||||
instance_id = var.instance_id
|
||||
no_reboot = var.no_reboot
|
||||
}
|
||||
|
||||
module "nixos-rebuild" {
|
||||
|
@ -95,3 +95,9 @@ variable "extra_environment" {
|
||||
description = "Extra environment variables to be set during installation. This can be usefull to set extra variables for the extra_files_script or disk_encryption_key_scripts"
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "no_reboot" {
|
||||
type = bool
|
||||
description = "Do not reboot after installation"
|
||||
default = false
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ resource "null_resource" "nixos-remote" {
|
||||
target_user = var.target_user
|
||||
target_host = var.target_host
|
||||
extra_files_script = var.extra_files_script
|
||||
no_reboot = var.no_reboot
|
||||
}, var.extra_environment)
|
||||
command = "${path.module}/run-nixos-anywhere.sh ${join(" ", local.disk_encryption_key_scripts)}"
|
||||
quiet = var.debug_logging
|
||||
|
@ -14,6 +14,9 @@ fi
|
||||
if [[ ${kexec_tarball_url-} != "" ]]; then
|
||||
args+=("--kexec" "${kexec_tarball_url}")
|
||||
fi
|
||||
if [[ ${no_reboot-} == "true" ]]; then
|
||||
args+=("--no-reboot")
|
||||
fi
|
||||
args+=("--store-paths" "${nixos_partitioner}" "${nixos_system}")
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
|
@ -77,3 +77,9 @@ variable "extra_environment" {
|
||||
description = "Extra environment variables to be set during installation. This can be usefull to set extra variables for the extra_files_script or disk_encryption_key_scripts"
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "no_reboot" {
|
||||
type = bool
|
||||
description = "Do not reboot the machine after installation"
|
||||
default = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user