GithubHelp home page GithubHelp logo

Comments (9)

fboender avatar fboender commented on July 24, 2024

Hey Alexander,

Thanks for reporting the bug. It looks like there's something unexpected in one of the hosts files.

I've put a template containing debugging information at http://www.electricmonk.nl/temp/html_fancy.tpl

If you could download it and then try with that template:

$ ./ansible-cmdb -t /home/fboender/Downloads/html_fancy.tpl ../example/out > out.dump

It should give us an indication in which host and section the problem is occuring. It will be the last host and the last line of the output. If you could send me the offending hosts file ([email protected]; anything you send me will be kept strictly confidential), or paste the last line in the output here, I can see if I can fix it. It would also be helpful to know which type of host (OS, mostly) the host giving the problem is.

Thanks for your help!

from ansible-cmdb.

fboender avatar fboender commented on July 24, 2024

Oops, accidentally closed the issue. Reopening.

from ansible-cmdb.

alexbarton avatar alexbarton commented on July 24, 2024

Specifying a full path name to a template file fails here:

ansible-cmdb -t ./html_fancy.tpl reports >out.txt
Template not found: /usr/local/Cellar/ansible-cmdb/1.6/./html_fancy.tpl.tpl

But I installed your "debug template" as /usr/local/Cellar/ansible-cmdb/1.6/debug.tpl and called ansible-cmdb like this:

$ ansible-cmdb -t debug ./reports/ >out.txt
Traceback (most recent call last):
  File "/usr/local/bin/ansible-cmdb", line 632, in <module>
    sys.stdout.write(mytemplate.render(hosts=ansible.hosts, **params))
  File "/usr/local/Cellar/ansible-cmdb/1.6/mako/template.py", line 443, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/local/Cellar/ansible-cmdb/1.6/mako/runtime.py", line 803, in _render
    **_kwargs_for_callable(callable_, data))
  File "/usr/local/Cellar/ansible-cmdb/1.6/mako/runtime.py", line 835, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/local/Cellar/ansible-cmdb/1.6/mako/runtime.py", line 860, in _exec_template
    callable_(context, *args, **kwargs)
  File "_usr_local_Cellar_ansible_cmdb_1_6_debug_tpl", line 110, in render_body
TypeError: argument of type 'Undefined' is not iterable

out.txt doesn't contain anything after this, it is 0 bytes long, there is no output to stdout at all …

from ansible-cmdb.

alexbarton avatar alexbarton commented on July 24, 2024

Okay, but I found out by hand which inventory files do cause the problem: this are all host files of OpenBSD systems!

If I remove all OpenBSD systems from my reports/ folder, ansible-cmdb works as expected.
But if I add an inventory file of an arbitrary OpenBSD system, it fails with the backtrace shown above.

from ansible-cmdb.

alexbarton avatar alexbarton commented on July 24, 2024

@fboender I sent you an example inventory file by email. Please let me know if I can test something or you need more information!

from ansible-cmdb.

fboender avatar fboender commented on July 24, 2024

Hey Alexander.

Thanks for figuring that out! I'll write up a fix soon.

from ansible-cmdb.

fboender avatar fboender commented on July 24, 2024

Hey Alexander,

I pushed a fix for OpenBSD facts to the master branch. There's still some missing information (see issue #51 ), but at least it doesn't crash now. Can you verify that it works?

Thanks in advance!

from ansible-cmdb.

fboender avatar fboender commented on July 24, 2024

I'm closing this issue in the assumption that things are working correctly now. If not, please reopen!

from ansible-cmdb.

alexbarton avatar alexbarton commented on July 24, 2024

Thanks @fboender, I can confirm that your patches fixed the issue.

from ansible-cmdb.

Related Issues (20)

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.