Skip to content

Commit

Permalink
Only replace 'ansible_' when key is a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
fboender committed Jan 29, 2018
1 parent d3a493f commit 87df7e6
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/ansiblecmdb/data/tpl/html_fancy_defs.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,21 @@
<table>
% for k, v in d.items():
<tr>
<th>${k.replace('ansible_', '')}</th>
<th>
% if type(k) == "str":
${k.replace('ansible_', '')}
% else:
${k}
% endif
</th>
<td>
% if type(v) == list:
${r_list(v)}
% elif type(v) == dict:
${r_dict(v)}
% else:
${v}
% endif
% if type(v) == list:
${r_list(v)}
% elif type(v) == dict:
${r_dict(v)}
% else:
${v}
% endif
</td>
</tr>
% endfor
Expand Down

0 comments on commit 87df7e6

Please sign in to comment.