mail_body.j2 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. <td>{{ ansible_fqdn }}</td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. <h2>Server &Uuml;bersicht</h2>
  103. <table>
  104. <thead>
  105. <tr>
  106. <th colspan="2">Host Informationen</th>
  107. </tr>
  108. </thead>
  109. <tbody>
  110. <tr>
  111. <td># Distribution:</td>
  112. <td>{{ ansible_distribution}} {{ansible_distribution_version}} ({{ ansible_distribution_release }})</td>
  113. </tr>
  114. <tr>
  115. <td># Vendor:</td>
  116. <td>{{ ansible_system_vendor }}</td>
  117. </tr>
  118. <tr>
  119. <td># FQDN:</td>
  120. <td>{{ ansible_fqdn }}</td>
  121. </tr>
  122. <tr>
  123. <td># Product:</td>
  124. <td>{{ ansible_product_name }}</td>
  125. </tr>
  126. <tr>
  127. <td># IP-Adressen:</td>
  128. <td>{{ ansible_eth0.ipv4.address }} ({{ ansible_eth0.device }})</td>
  129. </tr>
  130. </tbody>
  131. </tr>
  132. </table>
  133. <h2>Upgrade (Paketaktualisierung) durchf&uuml;hren</h2>
  134. <table>
  135. <thead>
  136. <tr>
  137. <th colspan="2">apt update &amp;&amp; apt upgrade</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. {% for line in apt_upgrade.stdout_lines %}
  142. <tr>
  143. <td># LOG:</td>
  144. <td>{{ line }}</td>
  145. </tr>
  146. {% endfor %}
  147. </tbody>
  148. </tr>
  149. </table>
  150. <h2>Veraltete heruntergeladene Archive l&ouml;schen</h2>
  151. <table>
  152. <thead>
  153. <tr>
  154. <th colspan="2">apt autoclean</th>
  155. </tr>
  156. </thead>
  157. <tbody>
  158. {% for line in apt_autoclean.stdout_lines %}
  159. <tr>
  160. <td># LOG:</td>
  161. <td>{{ line }}</td>
  162. </tr>
  163. {% endfor %}
  164. </tbody>
  165. </tr>
  166. </table>
  167. <h2>Pr&uuml;fen laufender Prozesse</h2>
  168. <table>
  169. <thead>
  170. <tr>
  171. <th colspan="2">lsof +L1 -R</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. {% for line in lsof.stdout_lines %}
  176. <tr>
  177. <td># LOG:</td>
  178. <td>{{ line }}</td>
  179. </tr>
  180. {% endfor %}
  181. </tbody>
  182. </tr>
  183. </table>
  184. </body>