Comments (9)
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.
Oops, accidentally closed the issue. Reopening.
from ansible-cmdb.
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.
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.
@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.
Hey Alexander.
Thanks for figuring that out! I'll write up a fix soon.
from ansible-cmdb.
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.
I'm closing this issue in the assumption that things are working correctly now. If not, please reopen!
from ansible-cmdb.
Thanks @fboender, I can confirm that your patches fixed the issue.
from ansible-cmdb.
Related Issues (20)
- Missing link to jquery breaks default presentation HOT 4
- CSV template - rendering error after custom facts added HOT 11
- RFE: Provide ability to prune some variables from host/group vars
- Is it possible to add additional & custom columns to the CSV template? HOT 2
- Comments must be stripped before calling shlex.split
- ModuleNotFoundError: No module named 'ansiblecmdb' HOT 2
- New column: public IP address HOT 1
- [html_fancy_split] Unable to sort custom column by mixed type "string"/ "num" AND how to custom template html_fancy_split HOT 9
- CSV import feature to manage inventory and host_vars easily HOT 1
- CSV export feature for easy reporting HOT 2
- kernel info to txt_table.tpl
- Ansible Tower Generated Json Output unable to generate report HOT 1
- No suitable python version found (v2.7 or higher required). Aborting HOT 4
- Template html fancy split is broken with Edge when excluding columns HOT 1
- Debian 11 can't use default template with ansible-cmdb 1.31 HOT 3
- F
- Markdown split doesn't work
- Does not get built with python-packaging 23.0
- [Question] Offline js libraries
- Using facts_cache for esx hosts is not working properly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-cmdb.