I must have a syntax error or don’t understand something, but the following errors out. Am I doing this wrong? or is there something special about trying to search getent_{group,passwd}?
`
- debug:
var: getent_group.dba
when: getent_group.dba is search(“10001”)
RESULT:
FAILED! => {“msg”: “The conditional check ‘getent_group.dba is match("10001")’ failed. The error was: Unexpected templating type error occurred on ({% if getent_group.dba is match("10000") %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appears to have been in ‘/etc/ansible/playbooks/one-offs/clean_up_users.yml’: line 13, column 7, 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”}
CONTENT OF VAR getent_group.dba:
ok: [myserver] => {
“getent_group.dba”: [
“x”,
“10001”,
“”
]
}
`