Last active
April 16, 2022 23:47
-
-
Save shmileee/c57cc05440331dcd3bcc9ccc81bdf1e8 to your computer and use it in GitHub Desktop.
main.yml
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
def custom_filter(things): | |
equal = set() | |
for thing in things: | |
... | |
return ... | |
class FilterModule(object): | |
def filters(self): | |
return {'custom_filter': custom_filter} |
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
--- | |
- name: "Custom filter query" | |
set_fact: | |
results: "{{ api_response.json | custom_filter }}" | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment