mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
fix nodegroup_comp func
This commit is contained in:
parent
f096375d25
commit
cddc1c8397
@ -1263,7 +1263,6 @@ class LocalClient(object):
|
||||
)
|
||||
tgt = salt.utils.minions.nodegroup_comp(tgt,
|
||||
self.opts['nodegroups'])
|
||||
tgt = tgt[:-3]
|
||||
expr_form = 'compound'
|
||||
|
||||
# Convert a range expression to a list of nodes and change expression
|
||||
|
@ -65,8 +65,10 @@ def nodegroup_comp(group, nodegroups, skip=None):
|
||||
'''
|
||||
Take the nodegroup and the nodegroups and fill in nodegroup refs
|
||||
'''
|
||||
k = 1
|
||||
if skip is None:
|
||||
skip = set([group])
|
||||
k = 0
|
||||
if group not in nodegroups:
|
||||
return ''
|
||||
gstr = nodegroups[group]
|
||||
@ -80,7 +82,10 @@ def nodegroup_comp(group, nodegroups, skip=None):
|
||||
continue
|
||||
skip.add(ngroup)
|
||||
ret += nodegroup_comp(ngroup, nodegroups, skip)
|
||||
if k == 1:
|
||||
return ret
|
||||
else:
|
||||
return ret[:-3]
|
||||
|
||||
|
||||
class CkMinions(object):
|
||||
|
Loading…
Reference in New Issue
Block a user