From 25788136c180dae490efbd6fa5060743897b226c Mon Sep 17 00:00:00 2001 From: Brian Ketelsen Date: Fri, 2 Feb 2024 15:17:42 -0500 Subject: [PATCH] feat: make prompt reconcile opt-in --- blincus | 6 +++++- recipes/0-jammybase.pkr.hcl | 9 +++++++++ recipes/1-jammydev.pkr.hcl | 9 +++++++++ recipes/2-jammydevx.pkr.hcl | 8 ++++++++ recipes/bullseye.pkr.hcl | 8 ++++++++ recipes/debian.pkr.hcl | 8 ++++++++ recipes/jammy.pkr.hcl | 8 ++++++++ recipes/jammyvm.pkr.hcl | 8 ++++++++ recipes/jammyx.pkr.hcl | 8 ++++++++ recipes/lunarvm.pkr.hcl | 8 ++++++++ recipes/mantic.pkr.hcl | 8 ++++++++ recipes/manticvm.pkr.hcl | 8 ++++++++ recipes/manticvmd.pkr.hcl | 8 ++++++++ recipes/manticx.pkr.hcl | 8 ++++++++ recipes/nix.pkr.hcl | 8 ++++++++ recipes/ubuntults.pkr.hcl | 8 ++++++++ src/initialize.sh | 5 ++++- src/lib/defaults.sh | 1 + 18 files changed, 132 insertions(+), 2 deletions(-) diff --git a/blincus b/blincus index 99ddb63..1200956 100755 --- a/blincus +++ b/blincus @@ -895,6 +895,7 @@ write_defaults() { config_set "default_home-mounts" "none" config_set "default_vm_image" "images:ubuntu/mantic/cloud" config_set "default_vm_profiles" "idmap,vmkeys" + config_set "prompt_integration" "false" # ubuntu defaults config_set "ubuntu.image" "images:ubuntu/jammy/cloud" @@ -2675,7 +2676,10 @@ initialize() { #personalize profiles - prompt_reconcile + doprompt=$(config_get "prompt_integration" "false") + if [ ! $doprompt == "false" ]; then + prompt_reconcile + fi } diff --git a/recipes/0-jammybase.pkr.hcl b/recipes/0-jammybase.pkr.hcl index 59993f9..f001511 100644 --- a/recipes/0-jammybase.pkr.hcl +++ b/recipes/0-jammybase.pkr.hcl @@ -1,3 +1,12 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} + source "incus" "jammybase" { image = "images:ubuntu/jammy" output_image = "jammybase" diff --git a/recipes/1-jammydev.pkr.hcl b/recipes/1-jammydev.pkr.hcl index abfe52d..448de72 100644 --- a/recipes/1-jammydev.pkr.hcl +++ b/recipes/1-jammydev.pkr.hcl @@ -1,3 +1,12 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} + source "incus" "jammydev" { image = "jammybase" output_image = "jammydev" diff --git a/recipes/2-jammydevx.pkr.hcl b/recipes/2-jammydevx.pkr.hcl index d59e7d9..865f1ac 100644 --- a/recipes/2-jammydevx.pkr.hcl +++ b/recipes/2-jammydevx.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "jammydevx" { image = "jammydev" output_image = "jammydevx" diff --git a/recipes/bullseye.pkr.hcl b/recipes/bullseye.pkr.hcl index 69ceb15..bd41fd1 100644 --- a/recipes/bullseye.pkr.hcl +++ b/recipes/bullseye.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "bullseye" { image = "images:debian/bullseye" output_image = "debian-bullseye" diff --git a/recipes/debian.pkr.hcl b/recipes/debian.pkr.hcl index cc1c1e2..4ae1d28 100644 --- a/recipes/debian.pkr.hcl +++ b/recipes/debian.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "bookworm" { image = "images:debian/bookworm" output_image = "debian-bookworm" diff --git a/recipes/jammy.pkr.hcl b/recipes/jammy.pkr.hcl index eeb8513..a055ead 100644 --- a/recipes/jammy.pkr.hcl +++ b/recipes/jammy.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "jammy" { image = "images:ubuntu/jammy" output_image = "ubuntu-jammy" diff --git a/recipes/jammyvm.pkr.hcl b/recipes/jammyvm.pkr.hcl index 258f0e3..6e3b551 100644 --- a/recipes/jammyvm.pkr.hcl +++ b/recipes/jammyvm.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "jammy" { image = "images:ubuntu/jammy" output_image = "jammyvm" diff --git a/recipes/jammyx.pkr.hcl b/recipes/jammyx.pkr.hcl index fe05ac5..dff1d57 100644 --- a/recipes/jammyx.pkr.hcl +++ b/recipes/jammyx.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "jammyx" { image = "images:ubuntu/jammy" output_image = "ubuntu-jammyx" diff --git a/recipes/lunarvm.pkr.hcl b/recipes/lunarvm.pkr.hcl index 8523b3b..6882399 100644 --- a/recipes/lunarvm.pkr.hcl +++ b/recipes/lunarvm.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "lunar" { image = "images:ubuntu/lunar" output_image = "lunarvm" diff --git a/recipes/mantic.pkr.hcl b/recipes/mantic.pkr.hcl index bdabfa8..f87ed78 100644 --- a/recipes/mantic.pkr.hcl +++ b/recipes/mantic.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "mantic" { image = "images:ubuntu/mantic" output_image = "ubuntu-mantic" diff --git a/recipes/manticvm.pkr.hcl b/recipes/manticvm.pkr.hcl index 5166bc3..70903b0 100644 --- a/recipes/manticvm.pkr.hcl +++ b/recipes/manticvm.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "mantic" { image = "images:ubuntu/mantic" output_image = "manticvm" diff --git a/recipes/manticvmd.pkr.hcl b/recipes/manticvmd.pkr.hcl index a29434a..017ef22 100644 --- a/recipes/manticvmd.pkr.hcl +++ b/recipes/manticvmd.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "mantic" { image = "images:ubuntu/mantic/desktop" output_image = "manticvmd" diff --git a/recipes/manticx.pkr.hcl b/recipes/manticx.pkr.hcl index caa4b84..29b714d 100644 --- a/recipes/manticx.pkr.hcl +++ b/recipes/manticx.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "manticx" { image = "images:ubuntu/mantic" output_image = "ubuntu-manticx" diff --git a/recipes/nix.pkr.hcl b/recipes/nix.pkr.hcl index b516e0a..fcbc09d 100644 --- a/recipes/nix.pkr.hcl +++ b/recipes/nix.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "nix" { image = "images:ubuntu/jammy" output_image = "ubuntu-nix" diff --git a/recipes/ubuntults.pkr.hcl b/recipes/ubuntults.pkr.hcl index ce1b10e..23fcdd3 100644 --- a/recipes/ubuntults.pkr.hcl +++ b/recipes/ubuntults.pkr.hcl @@ -1,3 +1,11 @@ +packer { + required_plugins { + incus = { + version = ">= 1.0.4" + source = "github.com/bketelsen/incus" + } + } +} source "incus" "focal" { image = "images:ubuntu/focal" output_image = "focalp" diff --git a/src/initialize.sh b/src/initialize.sh index d0ab341..30493f7 100644 --- a/src/initialize.sh +++ b/src/initialize.sh @@ -13,4 +13,7 @@ fi #personalize profiles -prompt_reconcile +doprompt=$(config_get "prompt_integration" "false") +if [ ! $doprompt == "false" ]; then + prompt_reconcile +fi diff --git a/src/lib/defaults.sh b/src/lib/defaults.sh index a0867c7..edb4595 100644 --- a/src/lib/defaults.sh +++ b/src/lib/defaults.sh @@ -9,6 +9,7 @@ write_defaults() { config_set "default_home-mounts" "none" config_set "default_vm_image" "images:ubuntu/mantic/cloud" config_set "default_vm_profiles" "idmap,vmkeys" + config_set "prompt_integration" "false" # ubuntu defaults config_set "ubuntu.image" "images:ubuntu/jammy/cloud"