From 1c9ca82055456443f016090cc2b9bbe0bac67782 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 20 Nov 2024 15:12:05 +0100 Subject: [PATCH] pkgs/cli: Fix tag creation for `clan machines create` --- pkgs/clan-cli/clan_cli/machines/create.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/clan-cli/clan_cli/machines/create.py b/pkgs/clan-cli/clan_cli/machines/create.py index f66c75992..1995bf38c 100644 --- a/pkgs/clan-cli/clan_cli/machines/create.py +++ b/pkgs/clan-cli/clan_cli/machines/create.py @@ -137,7 +137,9 @@ def create_machine(opts: CreateOptions) -> None: deploy = MachineDeploy() deploy.targetHost = opts.target_host # TODO: We should allow the template to specify machine metadata if not defined by user - new_machine = InventoryMachine(name=machine_name, deploy=deploy) + new_machine = InventoryMachine( + name=machine_name, deploy=deploy, tags=opts.machine.tags + ) inventory.machines.update({new_machine.name: dataclass_to_dict(new_machine)}) set_inventory(inventory, clan_dir, "Imported machine from template")