---
- name: "Subnet_of: Check if 10.1.1.0/24 is a subnet of 10.0.0.0/8"
  ansible.builtin.assert:
    that: "{{ '10.1.1.0/24' is ansible.utils.subnet_of '10.0.0.0/8' }}"

- name: "Subnet_of: Test invalidness"
  ansible.builtin.set_fact:
    criteria_check1: "{{ '10.0.0.0/8' is ansible.utils.subnet_of '10.1.1.0/24' }}"

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

- name: "Subnet_of: Test invalidness"
  ansible.builtin.set_fact:
    criteria_check2: "{{ '192.168.1.0/24' is ansible.utils.subnet_of '10.0.0.0/8' }}"

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