mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
Merge #114
114: terraform: Add support for '--stop-after-disko' parameter r=Lassulus a=dantefromhell Co-authored-by: dantefromhell <90508808+dantefromhell@users.noreply.github.com>
This commit is contained in:
commit
8ab64f7f09
@ -24,6 +24,7 @@ module "install" {
|
||||
nixos_system = module.system-build.result.out
|
||||
ssh_private_key = var.install_ssh_key
|
||||
debug_logging = var.debug_logging
|
||||
stop_after_disko = var.stop_after_disko
|
||||
instance_id = var.instance_id
|
||||
}
|
||||
|
||||
@ -31,6 +32,10 @@ module "nixos-rebuild" {
|
||||
depends_on = [
|
||||
module.install
|
||||
]
|
||||
|
||||
# Do not execute this step if var.stop_after_disko == true
|
||||
count = var.stop_after_disko ? 0 : 1
|
||||
|
||||
source = "../nixos-rebuild"
|
||||
nixos_system = module.system-build.result.out
|
||||
ssh_private_key = var.deployment_ssh_key
|
||||
|
@ -68,3 +68,9 @@ variable "debug_logging" {
|
||||
description = "Enable debug logging"
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "stop_after_disko" {
|
||||
type = bool
|
||||
description = "Exit after disko formating"
|
||||
default = false
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
locals {
|
||||
nixos_anywhere_flags = "${var.debug_logging ? "--debug" : ""} ${var.kexec_tarball_url != null ? "--kexec ${var.kexec_tarball_url}" : "" } --store-paths ${var.nixos_partitioner} ${var.nixos_system} ${var.target_user}@${var.target_host}"
|
||||
nixos_anywhere_flags = "${var.stop_after_disko ? "--stop-after-disko" : ""} ${var.debug_logging ? "--debug" : ""} ${var.kexec_tarball_url != null ? "--kexec ${var.kexec_tarball_url}" : "" } --store-paths ${var.nixos_partitioner} ${var.nixos_system} ${var.target_user}@${var.target_host}"
|
||||
}
|
||||
|
||||
resource "null_resource" "nixos-remote" {
|
||||
|
@ -50,3 +50,9 @@ variable "debug_logging" {
|
||||
description = "Enable debug logging"
|
||||
default = false
|
||||
}
|
||||
|
||||
variable "stop_after_disko" {
|
||||
type = bool
|
||||
description = "Exit after disko formating"
|
||||
default = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user