forked from stove/risotto
support raise in template
This commit is contained in:
parent
7f745b3609
commit
0b0503e109
1 changed files with 11 additions and 0 deletions
11
ansible/filter_plugins/raise.py
Normal file
11
ansible/filter_plugins/raise.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
from jinja2.exceptions import TemplateRuntimeError
|
||||
|
||||
def fraise(msg):
|
||||
raise TemplateRuntimeError(msg)
|
||||
|
||||
|
||||
class FilterModule:
|
||||
def filters(self):
|
||||
return {
|
||||
'raise': fraise,
|
||||
}
|
Loading…
Reference in a new issue