Skip to content

Commit

Permalink
Fix salt-cloud config dict update issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai committed Jan 4, 2024
1 parent c5cfe21 commit 06f1bba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/65789.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the condition for salt-cloud config dict update
4 changes: 3 additions & 1 deletion salt/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3248,7 +3248,9 @@ def get_cloud_config_value(name, vm_, opts, default=None, search_global=True):
# Let's get the value from the profile, if present
if "profile" in vm_ and vm_["profile"] is not None:
if name in opts["profiles"][vm_["profile"]]:
if isinstance(value, dict):
if isinstance(value, dict) and isinstance(
opts["profiles"][vm_["profile"]][name], dict
):
value.update(opts["profiles"][vm_["profile"]][name].copy())
else:
value = deepcopy(opts["profiles"][vm_["profile"]][name])
Expand Down

0 comments on commit 06f1bba

Please sign in to comment.