- Sesuaikan dengan debian 10
- tambahi pemberitahuan reboot dari unattended upgrademaster
parent
c3b14ea4b1
commit
50cee84a04
|
@ -19,6 +19,7 @@ galaxy_info:
|
|||
versions:
|
||||
- 8
|
||||
- 9
|
||||
- 10
|
||||
|
||||
galaxy_tags:
|
||||
- linux
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
---
|
||||
# tasks file for roles/motd
|
||||
- name: MOTD - set motd
|
||||
template:
|
||||
src: templates/etc/motd.j2
|
||||
dest: /etc/motd
|
||||
- name: MOTD - set motd
|
||||
template:
|
||||
src: templates/etc/motd.j2
|
||||
dest: /etc/motd
|
||||
mode: 0644
|
||||
|
||||
- name: MOTD - set motd banner
|
||||
template:
|
||||
template:
|
||||
src: templates/etc/update-motd.d/20-banner.j2
|
||||
dest: /etc/update-motd.d/20-banner
|
||||
mode: 0755
|
||||
|
||||
- name: MOTD - set system info
|
||||
template:
|
||||
template:
|
||||
src: templates/etc/update-motd.d/30-sysinfo.j2
|
||||
dest: /etc/update-motd.d/30-sysinfo
|
||||
mode: 0755
|
||||
|
||||
- name: MOTD - set free disk space
|
||||
template:
|
||||
template:
|
||||
src: templates/etc/update-motd.d/40-disks.j2
|
||||
dest: /etc/update-motd.d/40-disks
|
||||
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
|
||||
|
|
|
@ -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 IP Addresses: $NET_IPS
|
||||
$W DNS_SERVER..: $G$DNS_SERVER$W"
|
||||
$W DNS Server..: $G$DNS_SERVER$W"
|
||||
|
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue