community.general.nso_action (0.1.1) — module

Executes Cisco NSO actions and verifies output.

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

preview | supported by certified

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module provides support for executing Cisco NSO actions and then verifying that the output is as expected.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Sync NSO device
  nso_action:
    url: http://localhost:8080/jsonrpc
    username: username
    password: password
    path: /ncs:devices/device{ce0}/sync-from
    input: {}

Inputs

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

path:
    description: Path to NSO action.
    required: true

input:
    description: 'NSO action parameters.

      '

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

output_invalid:
    description: 'List of result parameter names that will cause the task to fail if they
      are present.

      '

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

output_required:
    description: 'Required output parameters.

      '

validate_strict:
    description: 'If set to true, the task will fail if any output parameters not in output_required
      is present in the output.

      '
    type: bool

Outputs

output:
  description: Action output
  returned: success
  sample:
    result: true
  type: dict