mail_body.j2 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
  6. <meta name="viewport" content="width=600" />
  7. <style>
  8. /* Tabelle */
  9. table {
  10. border: 1px solid #CCCCCC;
  11. width: 100%;
  12. text-align: left;
  13. padding:1px 2px;
  14. margin:15px;
  15. }
  16. /* Tabellen header */
  17. table thead {
  18. background: #CFCFCF;
  19. border-bottom: 2px solid #444444;
  20. font-size: 13px;
  21. }
  22. table thead th {
  23. font-weight: bold;
  24. color: #003399;
  25. }
  26. /* Tabellen body */
  27. table tbody td {
  28. font-size: 11px;
  29. font-weight: bold;
  30. color: #666666;
  31. }
  32. /* erste Spalte (odd) -> #LOG: */
  33. table td:nth-child(odd) {
  34. width: 80pt;
  35. }
  36. /* zweite Spalte (even) */
  37. table td:nth-child(even) {
  38. font-weight: normal;
  39. }
  40. /* Sonderklasse "header" */
  41. table.header tbody {
  42. background: #CFCFCF;
  43. }
  44. table.header thead {
  45. background: #FFFFFF;
  46. }
  47. .header tbody td{
  48. width: auto;
  49. }
  50. /* doppelte deklaration notwenig, ich versteh nur nicht warum ... */ }
  51. table.header tbody {
  52. background: #CFCFCF;
  53. }
  54. .header tbody {
  55. background: #CFCFCF;
  56. display: block;
  57. }
  58. /* Überschriften */
  59. h1 {
  60. font-size: 15pt;
  61. font-weight: bold;
  62. color:#666666;
  63. padding-left: 4px;
  64. margin: 0;
  65. }
  66. h2 {
  67. font-size: 10pt;
  68. color: #666666;
  69. border-bottom: 1px solid #CCCCCC;
  70. margin-top: 15px;
  71. }
  72. div.block {
  73. height: 20px;
  74. width: 20px;
  75. background-color: {{ color }};
  76. display: inline-block;
  77. }
  78. </style>
  79. </head>
  80. <body>
  81. <table class="header">
  82. <thead>
  83. <tr>
  84. <th>
  85. <h1>
  86. <div class="block">&nbsp;</div>
  87. {{ ansible_distribution}} Update Message
  88. </h1>
  89. </th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. <tr>
  94. <td>[U] {{ ansible_distribution}} Update Message # Installed updates on host {{ ansible_hostname }}</td>
  95. </tr>
  96. <tr>
  97. <td>{{ ansible_date_time.iso8601 }}</td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <h2>Server &Uuml;bersicht</h2>
  102. <table>
  103. <thead>
  104. <tr>
  105. <th colspan="2">Host Informationen</th>
  106. </tr>
  107. </thead>
  108. <tbody>
  109. <tr>
  110. <td># Distribution:</td>
  111. <td>{{ ansible_distribution}} {{ansible_distribution_version}} ({{ ansible_distribution_release }})</td>
  112. </tr>
  113. <tr>
  114. <td># Vendor:</td>
  115. <td>{{ ansible_system_vendor }}</td>
  116. </tr>
  117. <tr>
  118. <td># FQDN:</td>
  119. <td>{{ ansible_fqdn }}</td>
  120. </tr>
  121. <tr>
  122. <td># Product:</td>
  123. <td>{{ ansible_product_name }}</td>
  124. </tr>
  125. <tr>
  126. <td># IP-Adressen:</td>
  127. <td>{{ ansible_eth0.ipv4.address }} ({{ ansible_eth0.device }})</td>
  128. </tr>
  129. </tbody>
  130. </tr>
  131. </table>
  132. <h2>Upgradable Pakete</h2>
  133. <table>
  134. <thead>
  135. <tr>
  136. <th colspan="2">apt list --upgradable</th>
  137. </tr>
  138. </thead>
  139. <tbody>
  140. {% for line in apt_upgradeable.stdout_lines %}
  141. <tr>
  142. <td># LOG:</td>
  143. <td>{{ line }}</td>
  144. </tr>
  145. {% endfor %}
  146. </tbody>
  147. </tr>
  148. </table>
  149. <h2>Upgrade (Paketaktualisierung) durchf&uuml;hren</h2>
  150. <table>
  151. <thead>
  152. <tr>
  153. <th colspan="2">apt update &amp;&amp; apt upgrade</th>
  154. </tr>
  155. </thead>
  156. <tbody>
  157. {% for line in apt_upgrade.stdout_lines %}
  158. <tr>
  159. <td># LOG:</td>
  160. <td>{{ line }}</td>
  161. </tr>
  162. {% endfor %}
  163. </tbody>
  164. </tr>
  165. </table>
  166. <h2>Veraltete heruntergeladene Archive l&ouml;schen</h2>
  167. <table>
  168. <thead>
  169. <tr>
  170. <th colspan="2">apt autoclean</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. {% for line in apt_autoclean.stdout_lines %}
  175. <tr>
  176. <td># LOG:</td>
  177. <td>{{ line }}</td>
  178. </tr>
  179. {% endfor %}
  180. </tbody>
  181. </tr>
  182. </table>
  183. <h2>Pr&uuml;fen laufender Prozesse</h2>
  184. <table>
  185. <thead>
  186. <tr>
  187. <th colspan="2">lsof +L1 -R</th>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. {% for line in lsof.stdout_lines %}
  192. <tr>
  193. <td># LOG:</td>
  194. <td>{{ line }}</td>
  195. </tr>
  196. {% endfor %}
  197. </tbody>
  198. </tr>
  199. </table>
  200. </body>