---
- name: Check for graceful fail of invalid regex
  ansible.utils.fact_diff:
    before: [0, 1, 2]
    after: [0, 1, 2, 3]
    plugin:
      vars:
        skip_lines:
          - "+"
  ignore_errors: true
  register: result

- name: Assert
  ansible.builtin.assert:
    that: "{{ msg in result.msg }}"
  vars:
    msg: "The regex '+', is not valid"
