mail_body.j2 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. table {
  9. border: 1px solid #CCCCCC;
  10. width: 100%;
  11. text-align: left;
  12. }
  13. table td, table th {
  14. # padding: 3px 3px;
  15. }
  16. table tbody td {
  17. font-size: 13px;
  18. font-weight: bold;
  19. color: #666666;
  20. }
  21. table td:nth-child(even) {
  22. font-weight: normal;
  23. }
  24. table thead {
  25. background: #CFCFCF;
  26. border-bottom: 2px solid #444444;
  27. }
  28. table thead th {
  29. font-weight: bold;
  30. color: #003399;
  31. }
  32. table.header thead th {
  33. background: #FFFFFF;
  34. } }
  35. table.header tbody td {
  36. background: #CFCFCF;
  37. }
  38. h1 {
  39. font-size: 15pt;
  40. font-weight: bold;
  41. color:#666666;
  42. padding-left: 4px;
  43. }
  44. h2 {
  45. font-size: 10pt;
  46. color: #666666;
  47. border-bottom: 1px solid #CCCCCC;
  48. margin-top: 15px;
  49. }
  50. h1 {
  51. font-size: 15pt;
  52. font-weight: bold;
  53. color:#666666;
  54. }
  55. </style>
  56. </head>
  57. <body>
  58. <table class="header">
  59. <thead>
  60. <tr>
  61. <th><h1>{{ ansible_distribution}} Update Message</h1></th>
  62. </tr>
  63. </thead>
  64. <tbody>
  65. <tr>
  66. <td>[U] {{ ansible_distribution}} Update Message # Installed updates on host {{ ansible_hostname }}</td>
  67. </tr>
  68. <tr>
  69. <td>{{ ansible_date_time.iso8601 }}</td>
  70. <td>{{ ansible_fqdn }}</td>
  71. </tr>
  72. </tbody>
  73. </table>
  74. <h2>Server &Uuml;bersicht</h2>
  75. <table>
  76. <thead>
  77. <tr>
  78. <th colspan="2">Host Informationen</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. <tr>
  83. <td># Distribution:</td>
  84. <td>{{ ansible_distribution}} {{ansible_distribution_version}} ({{ ansible_distribution_release }})</td>
  85. </tr>
  86. <tr>
  87. <td># Vendor:</td>
  88. <td>{{ ansible_system_vendor }}</td>
  89. </tr>
  90. <tr>
  91. <td># FQDN:</td>
  92. <td>{{ ansible_fqdn }}</td>
  93. </tr>
  94. <tr>
  95. <td># Product:</td>
  96. <td>{{ ansible_product_name }}</td>
  97. </tr>
  98. <tr>
  99. <td># IP-Adressen:</td>
  100. <td>{{ ansible_eth0.ipv4.address }} ({{ ansible_eth0.device }})</td>
  101. </tr>
  102. </tbody>
  103. </tr>
  104. </table>
  105. <h2>Upgrade (Paketaktualisierung) durchf&uuml;hren</h2>
  106. <table>
  107. <thead>
  108. <tr>
  109. <th colspan="2">apt update &amp;&amp; apt upgrade</th>
  110. </tr>
  111. </thead>
  112. <tbody>
  113. {% for line in apt_upgrade.stdout_lines %}
  114. <tr>
  115. <td># LOG:</td>
  116. <td>{{ line }}</td>
  117. </tr>
  118. {% endfor %}
  119. </tbody>
  120. </tr>
  121. </table>
  122. <h2>Veraltete heruntergeladene Archive l&ouml;schen</h2>
  123. <table>
  124. <thead>
  125. <tr>
  126. <th colspan="2">apt autoclean</th>
  127. </tr>
  128. </thead>
  129. <tbody>
  130. {% for line in apt_autoclean.stdout_lines %}
  131. <tr>
  132. <td># LOG:</td>
  133. <td>{{ line }}</td>
  134. </tr>
  135. {% endfor %}
  136. </tbody>
  137. </tr>
  138. </table>
  139. <h2>Pr&uuml;fen laufender Prozesse</h2>
  140. <table>
  141. <thead>
  142. <tr>
  143. <th colspan="2">lsof +L1 -R</th>
  144. </tr>
  145. </thead>
  146. <tbody>
  147. {% for line in lsof.stdout_lines %}
  148. <tr>
  149. <td># LOG:</td>
  150. <td>{{ line }}</td>
  151. </tr>
  152. {% endfor %}
  153. </tbody>
  154. </tr>
  155. </table>
  156. </body>