Created
June 19, 2017 21:02
-
-
Save nerzhul/ad2dc4c05d4b23132c64eb848a6be6d5 to your computer and use it in GitHub Desktop.
ansible crc32 filter
This file contains hidden or 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
# plugins/filter/crc32.py | |
import binascii | |
def crc32(s): | |
return binascii.crc32(s) & 0xffffffff | |
class FilterModule(object): | |
''' Ansible core jinja2 filters ''' | |
def filters(self): | |
return { | |
'crc32': crc32, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment