mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-16 01:50:39 +00:00
replace std with rule
This commit is contained in:
parent
057939ca09
commit
96c50be68f
@ -334,10 +334,10 @@ class RulesLoader:
|
||||
)
|
||||
|
||||
def validate(self):
|
||||
normalized_std = list(toolz.remove(lambda x: x.rid == "", self.rules))
|
||||
unique_std = len(list(toolz.unique(normalized_std, key=lambda x: x.rid)))
|
||||
all_std = len(normalized_std)
|
||||
if all_std != unique_std:
|
||||
normalize_rule = list(toolz.remove(lambda x: x.rid == "", self.rules))
|
||||
unique_rule = len(list(toolz.unique(normalize_rule, key=lambda x: x.rid)))
|
||||
all_rules = len(normalize_rule)
|
||||
if all_rules != unique_rule:
|
||||
sysexit_with_message(
|
||||
"Found duplicate tags in rules definition. Please use unique tags only."
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user