fatal: : FAILED! => {"failed": true, "msg": "The conditional check 'output | search(\"distribute-list\")' failed. The error was: Unexpected templating type error occurred on ({% if output | search(\"distribute-list\") %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appears to have been in '/home/khibiny/test4.yml': line 26, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - debug:\n ^ here\n"}
to retry, use: --limit @/home/khibiny/test4.retry register: output
- debug:
msg: "{{output.stdout_lines}}"
when: output | search("distribute-list")when: "'distribute-list' in output.stdout_lines"