mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix issue with using roster_defaults with flat or cloud rosters.
fixes #43449 fixes #43643
This commit is contained in:
parent
36b0b1174b
commit
aebe76b6f8
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
|
|||
))
|
||||
preferred_ip = extract_ipv4(roster_order, ip_list)
|
||||
|
||||
ret[minion_id] = __opts__.get('roster_defaults', {})
|
||||
ret[minion_id] = __opts__.get('roster_defaults', {}).copy()
|
||||
ret[minion_id].update({'host': preferred_ip})
|
||||
|
||||
ssh_username = salt.utils.cloud.ssh_usernames(vm_, cloud_opts)
|
||||
|
|
|
@ -142,7 +142,7 @@ class RosterMatcher(object):
|
|||
'''
|
||||
Return the configured ip
|
||||
'''
|
||||
ret = __opts__.get('roster_defaults', {})
|
||||
ret = __opts__.get('roster_defaults', {}).copy()
|
||||
if isinstance(self.raw[minion], string_types):
|
||||
ret.update({'host': self.raw[minion]})
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue