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

Query data from Cisco NSO.

| "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 querying data from Cisco NSO using XPath.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Select device name and description
  nso_query:
    url: http://localhost:8080/jsonrpc
    username: username
    password: password
    xpath: /ncs:devices/device
    fields:
    - name
    - description

Inputs

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

xpath:
    description: XPath selection relative to the root.
    required: true

fields:
    description: 'List of fields to select from matching nodes.

      '
    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

output:
  description: Value of matching nodes
  returned: success
  type: list

See also