You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm collecting a custom facts of NFS share name, and trying to display it in CMDB. I'm able to collect the data and display it in the fancy html page, however, the python unicode is formatting the output in an undesired way. Can anyone help me what would be the suitable code modification needed in html_fancy_defs.html so that I can display multi line output in a proper format.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi All,
I'm collecting a custom facts of NFS share name, and trying to display it in CMDB. I'm able to collect the data and display it in the fancy html page, however, the python unicode is formatting the output in an undesired way. Can anyone help me what would be the suitable code modification needed in html_fancy_defs.html so that I can display multi line output in a proper format.
Ansible CustomFact collection Logic
Ansible Playbook debug output
}
ok: [Server-1] => {
"nfsshare": [
"NetApp-vlan2:/vol/vol_GW_DG1/global",
"NetApp-vlan2:/vol/vol_WD_DW5/sapmnt",
"NetApp-vlan2:/vol/vol_GW_DG1/usr_sap_trans",
"NetApp-vlan2:/vol/vol_GW_DG1/profile",
"NetApp-vlan2:/vol/vol_GW_DG1/exe",
"NetApp-vlan2:/vol/vol_WD_DW5/usr_sap"
]
}
Output displayed in ansible CMDB
[u'NetApp-vlan2:/vol/vol_GW_DG1/global', u'NetApp-vlan2:/vol/vol_WD_DW5/sapmnt', u'NetApp-vlan2:/vol/vol_GW_DG1/usr_sap_trans', u'NetApp-vlan2:/vol/vol_GW_DG1/profile', u'NetApp-vlan2:/vol/vol_GW_DG1/exe', u'NetApp-vlan2:/vol/vol_WD_DW5/usr_sap']
html_fancy_defs.html logic
<%def name="col_nfsshare(host, **kwargs)">
${jsonxs(host, 'nfsshare', default='')}
</%def>
How can I modify the above html_fancy_defs logic so that I can get an output like below
Expected output
Thanks
Eldho Varghese
Beta Was this translation helpful? Give feedback.
All reactions