ansible.builtin.nso_verify (v2.5.10) — module

Verifies Cisco NSO configuration.

| "added in version" 2.5 of ansible.builtin"

Authors: Claes Nästén (@cnasten)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.5.10

Description

This module provides support for verifying Cisco NSO configuration is in compliance with specified values.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Verify interface is up
  nso_config:
    url: http://localhost:8080/jsonrpc
    username: username
    password: password
    data:
      ncs:devices:
        device:
        - name: ce0
          live-status:
            interfaces:
              interface:
                - name: GigabitEthernet0/12
                - state: Up

Inputs

    
url:
    description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
    required: true
    type: str

data:
    description: 'NSO data in format as C(| display json) converted to YAML. List entries
      can be annotated with a C(__state) entry. Set to in-sync/deep-in-sync for services
      to verify service is in sync with the network. Set to absent in list entries to
      ensure they are deleted if they exist in NSO.

      '
    required: true

timeout:
    default: 300
    description: JSON-RPC request timeout in seconds
    type: int

password:
    description: NSO password
    required: true
    type: str

username:
    description: NSO username
    required: true
    type: str

validate_certs:
    default: false
    description: When set to true, validates the SSL certificate of NSO when using SSL
    required: false
    type: bool

Outputs

violations:
  contains:
    expected-value:
      description: Expected value of path
      returned: always
      type: string
    path:
      description: Path to the value in violation
      returned: always
      type: string
    value:
      description: Current value of path
      returned: always
      type: string
  description: List of value violations
  returned: failed
  sample:
  - expected-value: CE0 example
    path: /ncs:devices/device{ce0}/description
    value: null
  type: complex

See also