Skip to content

Commit 971b38d

Browse files
committed
html_fancy: Recursive render "Custom Variables" if dict or list.
1 parent b462ad3 commit 971b38d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ansiblecmdb/data/tpl/html_fancy.tpl

+10-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,16 @@ if columns is not None:
207207
<h4>Custom variables</h4>
208208
<table>
209209
% for var_name, var_value in host['hostvars'].items():
210-
<tr><th>${var_name}</th><td>${var_value}</td></tr>
210+
<tr>
211+
<th>${var_name}</th>
212+
<td>
213+
% if type(var_value) == dict:
214+
${r_dict(var_value)}
215+
% elif type(var_value) == list:
216+
${r_list(var_value)}
217+
% else:
218+
${var_value}
219+
% endif
211220
% endfor
212221
</table>
213222
% endif

0 commit comments

Comments
 (0)