'Return True if a file matches the list of ignore_files.
Args:
filename (str): The filename that is being matched against.
Returns:
Boolean'

def _ignore_file(self, filename):

    for file_type in self.ignore_files:
        try:
            if re.search('{0}$'.format(file_type), filename):
                return True
        except Exception:
            err_msg = 'Invalid    regular    expression:    {0}'.format(file_type)
            raise AnsibleError(err_msg)
    return False
