diff --git a/anvil-python/anvil/commands/haproxy.py b/anvil-python/anvil/commands/haproxy.py index 2617ffe..e35d29d 100644 --- a/anvil-python/anvil/commands/haproxy.py +++ b/anvil-python/anvil/commands/haproxy.py @@ -21,7 +21,7 @@ from sunbeam.clusterd.client import Client from sunbeam.commands.terraform import TerraformInitStep from sunbeam.jobs import questions -from sunbeam.jobs.common import BaseStep +from sunbeam.jobs.common import BaseStep, ResultType from sunbeam.jobs.juju import JujuHelper from sunbeam.jobs.steps import ( AddMachineUnitsStep, @@ -106,7 +106,11 @@ def has_prompts(self) -> bool: if self.refresh: return False - return True + skip_result = self.is_skip() + if skip_result.result_type == ResultType.SKIPPED: + return False + else: + return True def prompt(self, console: Console | None = None) -> None: variables = questions.load_answers( diff --git a/anvil-python/anvil/commands/postgresql.py b/anvil-python/anvil/commands/postgresql.py index 89eb1b4..219edbc 100644 --- a/anvil-python/anvil/commands/postgresql.py +++ b/anvil-python/anvil/commands/postgresql.py @@ -182,7 +182,11 @@ def has_prompts(self) -> bool: if self.refresh: return False - return True + skip_result = self.is_skip() + if skip_result.result_type == ResultType.SKIPPED: + return False + else: + return True class ReapplyPostgreSQLTerraformPlanStep(DeployMachineApplicationStep): diff --git a/anvil-python/anvil/provider/local/commands.py b/anvil-python/anvil/provider/local/commands.py index 99680b0..b4629ad 100644 --- a/anvil-python/anvil/provider/local/commands.py +++ b/anvil-python/anvil/provider/local/commands.py @@ -22,6 +22,7 @@ from rich.table import Table from snaphelpers import Snap from sunbeam import utils +from sunbeam.commands.bootstrap_state import SetBootstrapped from sunbeam.commands.clusterd import ( ClusterAddJujuUserStep, ClusterAddNodeStep, @@ -306,6 +307,8 @@ def bootstrap( fqdn, ) ) + + plan4.append(SetBootstrapped(client)) run_plan(plan4, console) click.echo(f"Node has been bootstrapped with roles: {pretty_roles}")