ciscops.mdd.data_validation (1.1.2) — module

Validate data against a schema

| "added in version" 0.1.0 of ciscops.mdd"

Authors: Josh Lothian (@stevenca)

preview | supported by community

Install collection

Install with ansible-galaxy collection install ciscops.mdd:==1.1.2


Add to requirements.yml

  collections:
    - name: ciscops.mdd
      version: 1.1.2

Description

Validate data against a schema


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Build the topology
  hosts: localhost
  gather_facts: no
  tags:
    - cml
    - virl
    - network
  tasks:
    - name: Validate data against schema
      datavalidation:
        data: "{{ parsed_output }}"
        schema: "{{ lookup('file', schema_file) | from_yaml }}"
      register: validation_output

Inputs

    
data:
    description: The data to check against the schema
    required: true
    type: dict

schema:
    description: The schema used to check the data
    required: false
    type: dict

schema_file:
    description: The file containint the schema used to check the data
    required: false
    type: str