setup ssh splash screen using motd for debian bullseye
This commit is contained in:
5
ansible-5/roles/common/files/motd/reboot_required.sh
Normal file
5
ansible-5/roles/common/files/motd/reboot_required.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -x /usr/lib/update-notifier/update-motd-reboot-required ]; then
|
||||||
|
exec /usr/lib/update-notifier/update-motd-reboot-required
|
||||||
|
fi
|
||||||
@@ -143,6 +143,7 @@ swap_usage=`free -m | awk '/Swap:/ { printf("%3.1f%%", $3/$2*100) }'`
|
|||||||
#getboardtemp
|
#getboardtemp
|
||||||
|
|
||||||
# DISPLAY
|
# DISPLAY
|
||||||
|
echo
|
||||||
echo "System information as of: $date"
|
echo "System information as of: $date"
|
||||||
echo
|
echo
|
||||||
display "System load" "${load%% *}" "${critical_load}" "0" "" "${load#* }"
|
display "System load" "${load%% *}" "${critical_load}" "0" "" "${load#* }"
|
||||||
|
|||||||
7
ansible-5/roles/common/files/motd/updates_available.sh
Normal file
7
ansible-5/roles/common/files/motd/updates_available.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
stamp="/var/lib/update-notifier/updates-available"
|
||||||
|
|
||||||
|
[ ! -r "$stamp" ] || cat "$stamp"
|
||||||
|
|
||||||
|
find $stamp -newermt 'now-7 days' 2> /dev/null | grep -q -m 1 '.' || /usr/share/update-notifier/notify-updates-outdated
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
# update packages to latest
|
# update packages to latest
|
||||||
- include_tasks: apply_updates.yml
|
- include_tasks: apply_updates.yml
|
||||||
|
|
||||||
#- name: update login screen
|
- name: update login screen
|
||||||
# include_tasks: motd.yml
|
include_tasks: motd.yml
|
||||||
|
|
||||||
- name: update fstab
|
- name: update fstab
|
||||||
include_tasks: update_fstab.yml
|
include_tasks: update_fstab.yml
|
||||||
|
|||||||
@@ -12,10 +12,16 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- lsb-release
|
- lsb-release
|
||||||
- figlet
|
- figlet
|
||||||
- update-motd
|
# - update-motd
|
||||||
- lm-sensors
|
- lm-sensors
|
||||||
when: ansible_architecture != 'armv7l'
|
|
||||||
|
|
||||||
|
- name: Create /etc/update-motd.d/ if it does not exist
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/update-motd.d/
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
- name: remove help text
|
- name: remove help text
|
||||||
file:
|
file:
|
||||||
@@ -24,7 +30,6 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- /etc/update-motd.d/10-help-text
|
- /etc/update-motd.d/10-help-text
|
||||||
- /etc/update-motd.d/51-cloudguest
|
- /etc/update-motd.d/51-cloudguest
|
||||||
when: ansible_architecture != 'armv7l'
|
|
||||||
|
|
||||||
|
|
||||||
- name: add new info
|
- name: add new info
|
||||||
@@ -35,4 +40,3 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- { src: motd/hostname.sh, dest: 10-hostname }
|
- { src: motd/hostname.sh, dest: 10-hostname }
|
||||||
- { src: motd/systats.sh, dest: 11-sysstats}
|
- { src: motd/systats.sh, dest: 11-sysstats}
|
||||||
when: ansible_architecture != 'armv7l'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user