Hartmut Goebel <[email protected]> napisał: >Hi, > >I'm seeking a way to have complex computation within jinja-templates in >roles. The computations I need are approx 100 lines of code, so using >the jinja2-syntx "{%....%} for each line is tremulous. > >My first idea was to implement a python filter-plugin. But Ansible does >not search for plugins within the role's directory. > >* Is there a way to include a block of Python-code into the template?
No >* Is there a way to directly call a Python-script or function located >relativly to the template? You can try using `first_found` lookup to locate it, and `lines` lookup to call it. >* Any other solutions? You can also implement that computation as a custom module, and call it before calling template -- Wysłane za pomocą K-9 Mail. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/fdaf0ee8-b20f-47f9-935a-21bf2160d602%40email.android.com. For more options, visit https://groups.google.com/d/optout.
