---
- name: "Multicast: Check if 224.0.0.1 is a valid multicast IP address"
  ansible.builtin.assert:
    that: "{{ '224.0.0.1' is ansible.utils.multicast }}"

- name: "Multicast: Check if ff02::1 is a valid multicast IP address"
  ansible.builtin.assert:
    that: "{{ 'ff02::1' is ansible.utils.multicast }}"

- name: "Multicast: Test invalidness"
  ansible.builtin.set_fact:
    criteria_check1: "{{ '127.0.0.1' is ansible.utils.multicast }}"

- name: "Multicast: Assert invalidness"
  ansible.builtin.assert:
    that: "{{ criteria_check1 == false }}"

- name: "Multicast: Test invalidness"
  ansible.builtin.set_fact:
    criteria_check2: "{{ 'helloworld' is ansible.utils.multicast }}"

- name: "Multicast: Assert invalidness"
  ansible.builtin.assert:
    that: "{{ criteria_check2 == false }}"
