Git Product home page Git Product logo

ocnos-ansible-collection's People

Contributors

ipinfusion avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

jmguzmanc

ocnos-ansible-collection's Issues

Sending a Full Config File

Hello,

I am trying to send a config using Ansible 5.2.0 with :

---
- hosts: ocnos
  gather_facts: false

  tasks:

  - name: load a config from disk and replace the current config
    ipinfusion.ocnos.ocnos_config:
      src: hq-core-1.cfg
      backup: yes
      replace: line
    register: result

I get:
OSError: [Errno 36] File name too long: 'hostname router01\n!\nnmp-server enable traps link linkDown\

It appears to be trying to put the file contents into the file name field.

Can someone assist?

Ansible Doc does not work

Ansible-Doc does not work:

ansible-doc  ipinfusion.ocnos.ocnos_config
ERROR! module ipinfusion.ocnos.ocnos_config missing documentation (or could not parse documentation): ipinfusion.ocnos.ocnos_config did not contain a DOCUMENTATION attribute (/home/sanders/.ansible/collections/ansible_collections/ipinfusion/ocnos/plugins/modules/ocnos_config.py). unknown doc_fragment(s) in file /home/sanders/.ansible/collections/ansible_collections/ipinfusion/ocnos/plugins/modules/ocnos_config.py: ocnos

CLI warnings are treated as errors

When configuring breakouts, the CLI issues a warning. The ansible role treats this as an error and aborts the play, even though the configuration is valid and went successfully.

- name: Configure breakouts
  ipinfusion.ocnos.ocnos_config:
    lines:
      - port 8 breakout 4X25g
      - port 9 breakout 4X25g

Will result in:

"msg": "commit\r\r\n%% Warning : The interfaces & associated configs are deleted for this port/port-group \r\ncswitch_hostname(config)#"

A workaround is to use custom logic for failed_when and changed_when, but the ansible module should handle it correctly.

- name: Configure breakouts
  ipinfusion.ocnos.ocnos_config:
    lines:
      - port 8 breakout 4X25g
      - port 9 breakout 4X25g
  register: _result
  failed_when: _result.failed and 'msg' in _result and 'Warning' not in _result.msg
  changed_when: _result.changed or ('msg' in _result and 'Warning' in _result.msg)

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.