Make count
and append_const
actions use set_if
in icinga conf
This commit is contained in:
parent
a459b3cdbe
commit
b2524c8799
@ -124,7 +124,14 @@ class Icinga2ConfAction(argparse.Action):
|
||||
if action.required:
|
||||
print(" required = true")
|
||||
|
||||
if isinstance(action, argparse._StoreConstAction):
|
||||
if isinstance(
|
||||
action,
|
||||
(
|
||||
argparse._StoreConstAction,
|
||||
argparse._CountAction,
|
||||
argparse._AppendConstAction,
|
||||
),
|
||||
):
|
||||
print(f' set_if = "${command_name}_{icinga2_var}$"')
|
||||
else:
|
||||
print(f' value = "${command_name}_{icinga2_var}$"')
|
||||
|
Loading…
Reference in New Issue
Block a user