1

How to render a jinja template within a custom execution module?

I am trying to write a custom module to update confluence pages automatically. It is designed to be similar to "file.managed" call (only template source, context, and it has to respect pillar data available for given node).

can someone offer an example of pillar/context aware function call for rendering jinja template in custom module?

1 Answer 1

1

do the same as saltstack does in their file.managed example :

    if template:
        contents = __salt__['file.apply_template_on_contents'](
            contents,
            template=template,
            context=context,
            defaults=defaults,
            saltenv=__env__)

Not the answer you're looking for? Browse other questions tagged or ask your own question.