I tried to use pip list
and pip freeze
without success.
It might be something obvious but I am not able to find it so far.
Drop this file as ./action_plugins/jin_ver.py
:
from ansible.plugins.action import ActionBase
import jinja2
class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
result = super(ActionModule, self).run(tmp, task_vars)
return dict(msg=jinja2.__version__)
And execute this playbook ./test_jin.yaml
:
---
- hosts: localhost
gather_facts: no
tasks:
- action: jin_ver
You should see something like this:
$ ansible-playbook test_jin.yaml -v
TASK [jin_ver] *****************************************
ok: [localhost] => {"changed": false, "msg": "2.8"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With