Giter VIP home page Giter VIP logo

network-automation / ansible_inventory_report Goto Github PK

View Code? Open in Web Editor NEW
129.0 18.0 76.0 375 KB

This repo contains an Ansible networking inventory report playbook (inventory.yml). This playbook exports hostname, platform, mgmt0 IP address and code version to a HTML file. The jinja2 template used for the website can also highlight the version of code if it doesn't match a desired version.

License: Other

CSS 22.05% HTML 77.95%
ansible nxos playbook

ansible_inventory_report's Issues

library declaration in ansible.cfg

The library is set to a path to napalm in the ansible.cfg, is this needed? I was able to run this successfully without napalm installed.

error when run inventory-ios.yml

TASK [gathering IOS XE facts] **************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: No JSON object could be decoded
fatal: [noc01as01]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/martin/.ansible/tmp/ansible-tmp-1540945702.87-111704655859437/AnsiballZ_ios_facts.py", line 113, in \n _ansiballz_main()\n File "/home/martin/.ansible/tmp/ansible-tmp-1540945702.87-111704655859437/AnsiballZ_ios_facts.py", line 105, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/martin/.ansible/tmp/ansible-tmp-1540945702.87-111704655859437/AnsiballZ_ios_facts.py", line 48, in invoke_module\n imp.load_module('main', mod, module, MOD_DESC)\n File "/tmp/ansible_ios_facts_payload_20JweU/main.py", line 543, in \n File "/tmp/ansible_ios_facts_payload_20JweU/main.py", line 529, in main\n File "/tmp/ansible_ios_facts_payload_20JweU/main.py", line 228, in populate\n File "/tmp/ansible_ios_facts_payload_20JweU/main.py", line 164, in populate\n File "/tmp/ansible_ios_facts_payload_20JweU/ansible_ios_facts_payload.zip/ansible/module_utils/network/ios/ios.py", line 135, in run_commands\n File "/tmp/ansible_ios_facts_payload_20JweU/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py", line 167, in rpc\n File "/tmp/ansible_ios_facts_payload_20JweU/ansible_ios_facts_payload.zip/ansible/module_utils/connection.py", line 146, in _exec_jsonrpc\n File "/usr/lib/python2.7/json/init.py", line 339, in loads\n return _default_decoder.decode(s)\n File "/usr/lib/python2.7/json/decoder.py", line 364, in decode\n obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode\n raise ValueError("No JSON object could be decoded")\nValueError: No JSON object could be decoded\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

AnsibleUndefinedVariable

Hello,
Im running the playbook and I get this error.

fatal: [r2 -> localhost]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'dict object' has no attribute 'ansible_net_interfaces'"}

If I look in facts I have the attribute "ansible_net_interfaces"

thanks.

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.