Last active
November 12, 2021 10:27
-
-
Save aderixon/f5183bef178e64650788ac2e8dc618e5 to your computer and use it in GitHub Desktop.
Ansible Jinja2 2.7 equalto test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backported Jinja2 'equalto' test, from 2.10 | |
# required for EL7 | |
# place in test_plugins/ folder within your playbook or role directory: | |
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
import operator | |
class TestModule: | |
''' Ansible backported equalto jinja2 test ''' | |
def tests(self): | |
return { | |
'equalto': operator.eq, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment