Code Monkey home page Code Monkey logo

cisco_nxos's People

Contributors

ansible-zuul[bot] avatar colin-mccarthy avatar justjais avatar nilashishc avatar pabelanger avatar privateip avatar softwarefactory-project-zuul[bot] avatar trishnaguha avatar victorock avatar

Stargazers

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

Watchers

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

cisco_nxos's Issues

Error stop playbook

Hello,

I try to create a task / playbook to deploy a vlan on a switch but some command stops me the execution of the task while that the output of the command is good.

Do you have an idea ?

`

  • hosts: NEXUS
    gather_facts: no
    connection: local
    tasks:
    • name: Add vlan Nexus
      nxos_command:
      commands:
      - show version
      - show vlan id {{ id_vlan }}
      - configure terminal
      - vlan {{ id_vlan }}
      - name {{ name_vlan }}
      - exit
      - exit
      - copy running-config startup-config
      wait_for:
      - result[0] contains Nexus
      - result[1] contains found
      - result[2] contains configuration
      - result[6] contains 100%

ansible-playbook -i hosts.yml tasks/add_vlan_nexus.yml -e 'id_vlan="242"' -e 'name_vlan="test"' --verbose`

error:
`fatal: [NEXUS2]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "show vlan id 242\r\r\nVLAN 242 not found in current VLAN database\r\n\rswitch# "}

The output with the cli of the switch :

Is a normal output not en error beacause the vlan don't exist

Thank'you

config_manager/load - nxos_config_checkpoint_filename is not defined

Summary

The required fact nxos_config_checkpoint_filename is not defined.

The following code block expects nxos_config_checkpoint_filename to be defined.
https://github.com/ansible-network/cisco_nxos/blob/devel/includes/checkpoint/create.yaml#L13-L16

The nxos_checkpoint_filename fact is defined code block - but not reused in this repository.
https://github.com/ansible-network/cisco_nxos/blob/devel/tasks/config_manager/load.yaml#L49-L56

ERROR

TASK [ansible-network.cisco_nxos : remove old checkpoint file from device] ******************************************************************************************************************

task path: /home/vagrant/.ansible/roles/ansible-network.cisco_nxos/includes/checkpoint/create.yaml:13

fatal: [REDACTED]: FAILED! => {
    "msg": "The conditional check 'nxos_config_checkpoint_filename in nxos_dir_listing.stdout' failed. The error was: error while evaluating conditional (nxos_config_checkpoint_filename in nxos_dir_listing.stdout): Unable to look up a name or access an attribute in template string ({% if nxos_config_checkpoint_filename in nxos_dir_listing.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': coercing to Unicode: need string or buffer, AnsibleUndefined found\n\nThe error appears to be in '/home/vagrant/.ansible/roles/ansible-network.cisco_nxos/includes/checkpoint/create.yaml': line 13, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: remove old checkpoint file from device\n  ^ here\n"
}

FIX

The fix is to define nxos_config_checkpoint_filename when passing to the role but it would be nice if it handled by the role.

- name: test
  vars:
    function: config_manager/load
    config_manager_text: show version
    nxos_config_checkpoint_filename: chk_ansible
  import_role:
    name: ansible-network.cisco_nxos

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.