Fix(machines/create): always add 'deploy.targetHost'
Rationale: not passing the value, is equivalent to deleting a value from the inventory store See: 'delete_by_path' deploy.targetHost has a default of null (None)
This commit is contained in:
@@ -106,8 +106,7 @@ def create_machine(opts: CreateOptions, commit: bool = True) -> None:
|
||||
target_host = opts.target_host
|
||||
|
||||
new_machine = opts.machine
|
||||
if target_host:
|
||||
new_machine["deploy"] = {"targetHost": target_host}
|
||||
new_machine["deploy"] = {"targetHost": target_host} # type: ignore
|
||||
|
||||
inventory_store = InventoryStore(opts.clan_dir)
|
||||
inventory = inventory_store.read()
|
||||
|
||||
Reference in New Issue
Block a user