mail_body.j2 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. </style>
  73. </head>
  74. <body>
  75. <table class="header">
  76. <thead>
  77. <tr>
  78. <th><h1>{{ ansible_distribution}} Update Message</h1></th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <tr>
  83. <td>[U] {{ ansible_distribution}} Update Message # Installed updates on host {{ ansible_hostname }}</td>
  84. </tr>
  85. <tr>
  86. <td>{{ ansible_date_time.iso8601 }}</td>
  87. <td>{{ ansible_fqdn }}</td>
  88. </tr>
  89. </tbody>
  90. </table>
  91. <h2>Server &Uuml;bersicht</h2>
  92. <table>
  93. <thead>
  94. <tr>
  95. <th colspan="2">Host Informationen</th>
  96. </tr>
  97. </thead>
  98. <tbody>
  99. <tr>
  100. <td># Distribution:</td>
  101. <td>{{ ansible_distribution}} {{ansible_distribution_version}} ({{ ansible_distribution_release }})</td>
  102. </tr>
  103. <tr>
  104. <td># Vendor:</td>
  105. <td>{{ ansible_system_vendor }}</td>
  106. </tr>
  107. <tr>
  108. <td># FQDN:</td>
  109. <td>{{ ansible_fqdn }}</td>
  110. </tr>
  111. <tr>
  112. <td># Product:</td>
  113. <td>{{ ansible_product_name }}</td>
  114. </tr>
  115. <tr>
  116. <td># IP-Adressen:</td>
  117. <td>{{ ansible_eth0.ipv4.address }} ({{ ansible_eth0.device }})</td>
  118. </tr>
  119. </tbody>
  120. </tr>
  121. </table>
  122. <h2>Upgrade (Paketaktualisierung) durchf&uuml;hren</h2>
  123. <table>
  124. <thead>
  125. <tr>
  126. <th colspan="2">apt update &amp;&amp; apt upgrade</th>
  127. </tr>
  128. </thead>
  129. <tbody>
  130. {% for line in apt_upgrade.stdout_lines %}
  131. <tr>
  132. <td># LOG:</td>
  133. <td>{{ line }}</td>
  134. </tr>
  135. {% endfor %}
  136. </tbody>
  137. </tr>
  138. </table>
  139. <h2>Veraltete heruntergeladene Archive l&ouml;schen</h2>
  140. <table>
  141. <thead>
  142. <tr>
  143. <th colspan="2">apt autoclean</th>
  144. </tr>
  145. </thead>
  146. <tbody>
  147. {% for line in apt_autoclean.stdout_lines %}
  148. <tr>
  149. <td># LOG:</td>
  150. <td>{{ line }}</td>
  151. </tr>
  152. {% endfor %}
  153. </tbody>
  154. </tr>
  155. </table>
  156. <h2>Pr&uuml;fen laufender Prozesse</h2>
  157. <table>
  158. <thead>
  159. <tr>
  160. <th colspan="2">lsof +L1 -R</th>
  161. </tr>
  162. </thead>
  163. <tbody>
  164. {% for line in lsof.stdout_lines %}
  165. <tr>
  166. <td># LOG:</td>
  167. <td>{{ line }}</td>
  168. </tr>
  169. {% endfor %}
  170. </tbody>
  171. </tr>
  172. </table>
  173. </body>