% if not data is UNDEFINED and len(data) > 0: % for host in data: ${hostelem(host)} % endfor % endif <%def name="hostelem(host)">\ <%h = host %>\ % if h["hostname"] != "": ${h["hostname"]} % endif % if h["requires_reboot"] != "": ${h["requires_reboot"]} % endif % if h["nodetype"] != "": ${h["nodetype"]} % endif % if h["ip"] != "": ${h["ip"]} % endif % if "missing_pkgs" in h and len(h["missing_pkgs"]) > 0: % for pkg in sorted(h["missing_pkgs"]): ${pkg} % endfor % endif % if "installed" in h and len(h["installed"]) > 0: % for pkg in sorted(h["installed"]): ${pkg} ${h["installed"][pkg]} % endfor % endif % if "to_remove" in h and len(h["to_remove"]) > 0: % for pkg in sorted(h["to_remove"]): ${pkg} % endfor % endif % if h["secs_since_ack"] != "": ${h["secs_since_ack"]} % endif % if h["patch_failed"] != "": ${h["patch_failed"]} % endif % if h["stale_details"] != "": ${h["stale_details"]} % endif % if h["patch_current"] != "": ${h["patch_current"]} % endif