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:
|
if action.required:
|
||||||
print(" required = true")
|
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}$"')
|
print(f' set_if = "${command_name}_{icinga2_var}$"')
|
||||||
else:
|
else:
|
||||||
print(f' value = "${command_name}_{icinga2_var}$"')
|
print(f' value = "${command_name}_{icinga2_var}$"')
|
||||||
|
Loading…
Reference in New Issue
Block a user