Giter VIP home page Giter VIP logo

ansible-nso's Introduction

ansible-nso

The ansible-nso project provides an Ansible collection for managing and automating your Cisco NSO environment. It consists of a set of modules and roles for performing tasks in NSO.

This collection has been tested and supports version 6.2 and 6.3 of NSO.

*Note: This collection is not compatible with versions of Ansible before v2.16.

Requirements

Ansible v2.16.2 or newer

Install

Ansible must be installed

sudo pip install ansible

Install the collection

ansible-galaxy collection install cisco.nso

Use

Once the collection is installed, you can use it in a playbook by specifying the full namespace path to the module, plugin and/or role.

- hosts: nso
  gather_facts: no

  tasks:
    - name: CREATE DEVICE IN NSO
      cisco.nso.nso_config:
        url: https://10.10.20.49/jsonrpc
        username: developer
        password: C1sco12345
        data:
          tailf-ncs:devices:
            device:
            - address: 10.10.20.175
              description: CONFIGURED BY ANSIBLE!
              name: dist-rtr01
              authgroup: "labadmin"
              device-type:
                cli:
                  ned-id: "cisco-ios-cli-6.105"
              port: "22"
              state:
                admin-state: "unlocked"

Update

Getting the latest/nightly collection build

First Approach

Clone the ansible-nso repository.

git clone https://github.com/CiscoDevNet/ansible-nso.git

Go to the ansible-nso directory

cd ansible-nso

Pull the latest master on your NSO

git pull origin master

Build and Install a collection from source

ansible-galaxy collection build --force
ansible-galaxy collection install cisco-nso-* --force

See Also:

Contributing to this collection

Ongoing development efforts and contributions to this collection are tracked as issues in this repository.

We welcome community contributions to this collection. If you find problems, need an enhancement or need a new module, please open an issue or create a PR against the Cisco NSO collection repository.

ansible-nso's People

Contributors

arante avatar gundalow avatar jabelk avatar jillesca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-nso's Issues

nso_action does not handle YANG model choice properly for input

This is in reference to this question that was raised on the NSO developer hub forum:
https://community.cisco.com/t5/nso-developer-hub-discussions/using-ansible-quot-nso-action-quot-module-to-invoke-quot-load/m-p/4173500

The following line validates that the input key is a YANG child in the schema of the input container but for a choice this is not correct and the correct input is being rejected:

child = next((c for c in input_schema if c['name'] == key), None)

Unmaintained collection: Removal from Ansible (communtiy) package

It looks like this collection is effectively unmaintained. According to the current community guidelines for collections, we will consider removing it in a future version of the Ansible community package. Please see Unmaintained collection: cisco.nso for more information.

At least one month after this announcement appears here and on Bullhorn, the Ansible community engineering steering committee will vote on whether this collection is considered unmaintained and will be removed, or whether it will be kept. If it will be removed, this will happen earliest in Ansible 9.0.0. Please note that people can still manually install the collection with ansible-galaxy collection install mellanox.onyx even when it has been removed from Ansible.

ncs_config should return the commit-queue-id and the rollback-id

with NSO5.4 a "rollback-id" is available in json-rpc API. when conforming a config, the module should return this ID that could be used later in the playbook to rollback changes.

Similarly, commoit-queue-id would help the playbook to monitor the execution of the commit-queue item.

Collection Requirements Violation - Repository Management

Hi! The Ansible Community Steering Committee has determined that this collection does not tag its releases in its git repository. This violates the repository management section of the Collection Requirements:

Every collection MUST have a public git repository. Releases of the collection MUST be tagged in said repository. This means that releases MUST be git taged and that the tag name MUST exactly match the Galaxy version number. Tag names MAY have a v prefix, but a collection's tag names MUST have a consistent format from release to release.
Additionally, collection artifacts released to Galaxy MUST be built from the sources that are tagged in the collection's git repository as that release. Any changes made during the build process MUST be clearly documented so the collection artifact can be reproduced.

Note that this requirement has recently been clarified, but its intent remains the same. Please tag at least the previous 1-2 releases of your collection to come into compliance.

Please keep us updated and let us know if you have any questions. Thanks!

Consider using true/false for all booleans in docs

Based on the community decision to use true/false for boolean values in documentation and examples, we ask that you evaluate booleans in this collection and consider changing any that do not use true/false (lowercase).

See documentation block format for more info (specifically, option defaults).

If you have already implemented this or decide not to, feel free to close this issue.


P.S. This is auto-generated issue, please raise any concerns here

Compliance Checks with Ansible

feedback from user:

User is working on a compliance check where they use Ansible module to interact with NSO’s compliance templates. The challenge is we only could figure out how to save the results to the state directory with the html results. This has been difficult because we want to GET the results form the API to pass to Ansible.

I have a task to run the compliance report but there doesn't seem to be a great way to get the report itself from the API?
Right now, the script just looks to see if there were any violation errors and if there are, it will re-apply the template
It would be best if a preview of what the compliance report violations are could be added to the script. Trying to use the URI module to download that report like a web page could be awkward.
I had to write a small module to attach a device template in NSO as the nso_action ansible module didn't seem to be able to handle it correctly. This could be a bug in the ansible module.

Important information for collection maintainers

SUMMARY

Dear maintainers,

This is important for your collections!

  • In accordance with the Community decision, we have created the news-for-maintainers repository for announcements of changes impacting collection maintainers (see the examples) instead of Issue 45 that will be closed soon.

    • To keep yourself well-informed and, therefore, things in your collection working, please subscribe to the repository by using the Watch button in the upper right corner on the repository's home page.
    • If you do not want to get notifications about related discussions, please subscribe only to Issues.
    • Please read the brief guidelines on how the repository should be used.
    • Please avoid unnecessary discussions in issues, use the Discussions feature. Every comment posted will notify a lot of folks!
  • Also we would like to remind you about the Bullhorn contributor newsletter which has recently started to be released weekly. To learn what it looks like, see the past releases. Please subscribe and talk to the Community via Bullhorn!

  • Join us in #ansible-social (for news reporting & chat), #ansible-community (for discussing collection & maintainer topics), and other channels on Matrix/IRC.

  • Help the Community and the Steering Committee to make right decisions by taking part in discussing and voting on the Community Topics that impact the whole project and the collections in particular. Your opinion there will be much appreciated!

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.