- Sesuaikan dengan debian 10

- tambahi pemberitahuan reboot  dari unattended upgrade
master
Ronggo Radityo 2020-03-23 11:13:00 +07:00
parent c3b14ea4b1
commit 50cee84a04
4 changed files with 33 additions and 8 deletions

View File

@ -19,6 +19,7 @@ galaxy_info:
versions: versions:
- 8 - 8
- 9 - 9
- 10
galaxy_tags: galaxy_tags:
- linux - linux

View File

@ -1,25 +1,31 @@
--- ---
# tasks file for roles/motd # tasks file for roles/motd
- name: MOTD - set motd - name: MOTD - set motd
template: template:
src: templates/etc/motd.j2 src: templates/etc/motd.j2
dest: /etc/motd dest: /etc/motd
mode: 0644 mode: 0644
- name: MOTD - set motd banner - name: MOTD - set motd banner
template: template:
src: templates/etc/update-motd.d/20-banner.j2 src: templates/etc/update-motd.d/20-banner.j2
dest: /etc/update-motd.d/20-banner dest: /etc/update-motd.d/20-banner
mode: 0755 mode: 0755
- name: MOTD - set system info - name: MOTD - set system info
template: template:
src: templates/etc/update-motd.d/30-sysinfo.j2 src: templates/etc/update-motd.d/30-sysinfo.j2
dest: /etc/update-motd.d/30-sysinfo dest: /etc/update-motd.d/30-sysinfo
mode: 0755 mode: 0755
- name: MOTD - set free disk space - name: MOTD - set free disk space
template: template:
src: templates/etc/update-motd.d/40-disks.j2 src: templates/etc/update-motd.d/40-disks.j2
dest: /etc/update-motd.d/40-disks dest: /etc/update-motd.d/40-disks
mode: 0755 mode: 0755
- name: MOTD - Reboot Warning
template:
src: templates/etc/update-motd.d/80-reboot.j2
dest: /etc/update-motd.d/80-reboot
mode: 0755

View File

@ -52,4 +52,4 @@ $W CPU.........: $W$PROCESSOR_NAME ($G$PROCESSOR_COUNT$W vCPU)
$W Memory......: $G$USED$W used, $G$FREE$W free, $G$TOTAL$W total $W Memory......: $G$USED$W used, $G$FREE$W free, $G$TOTAL$W total
$W IP Addresses: $NET_IPS $W IP Addresses: $NET_IPS
$W DNS_SERVER..: $G$DNS_SERVER$W" $W DNS Server..: $G$DNS_SERVER$W"

View File

@ -0,0 +1,18 @@
#!/bin/bash
white="\e[39m"
green="\e[1;32m"
red="\e[1;31m"
dim="\e[2m"
undim="\e[0m"
if [ -f /var/run/reboot-required ]; then
echo
echo -e "${red}<<================= REBOOT REQUIRED =====================>"
echo
echo -e "${white}Packages causing reboot:${dim}"
cat -n /var/run/reboot-required.pkgs
echo -e "${red}<<=======================================================>${undim}"
fi