conform motd to 80x24
This commit is contained in:
parent
a0452bf4f9
commit
9bb45cd61b
34
files/etc/dynmotd
Normal file
34
files/etc/dynmotd
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
RED=$(tput setaf 1)
|
||||
GREEN=$(tput setaf 2)
|
||||
YELLOW=$(tput setaf 3)
|
||||
BLUE=$(tput setaf 4)
|
||||
MAGENTA=$(tput setaf 5)
|
||||
CYAN=$(tput setaf 6)
|
||||
WHITE=$(tput setaf 7)
|
||||
RESET=$(tput sgr0)
|
||||
BOLD=$(tput bold)
|
||||
|
||||
uptime=`cat /proc/uptime | cut -f1 -d.`
|
||||
upDays=$((uptime/60/60/24))
|
||||
upHours=$((uptime/60/60%24))
|
||||
upMins=$((uptime/60%60))
|
||||
upSecs=$((uptime%60))
|
||||
|
||||
echo -e "${GREEN}
|
||||
.:^~~~~^:. ${RESET}$(hostname)${GREEN}
|
||||
.^!?JJJJJJJJJJ?!^. -------------------------------------------------
|
||||
~?JJJJJJJJJJJJJJJJ?~ ${RESET}$(cat /etc/redhat-release)${GREEN}
|
||||
:?JJJJJJJJJJJJJJJJJJJJ?: ${RESET}Uptime: ${BOLD}$upDays days $upHours hours $upMins minutes $upSecs seconds${GREEN}
|
||||
.?JJJJJJJJJJJJJJ7?JJJJJJ?.
|
||||
!JJJJJJJJJJJJJ7: ^?JJJJJ!
|
||||
7JJJJJJJJJJJ!: ^7JJJ7
|
||||
!JJJJJJJJJ!. :. :7J!
|
||||
.?JJJJJ?~. :7JJ!. :.
|
||||
:?JJ?~. ^7JJJJJJ!:
|
||||
.~~ ^?JJJJJJJJY?:
|
||||
^?YYJJJJJJ?!^.
|
||||
.:^~~~~^:.
|
||||
${RESET}
|
||||
"
|
||||
|
@ -1,34 +1,15 @@
|
||||
#!/bin/bash
|
||||
RED=$(tput setaf 1)
|
||||
GREEN=$(tput setaf 2)
|
||||
YELLOW=$(tput setaf 3)
|
||||
BLUE=$(tput setaf 4)
|
||||
MAGENTA=$(tput setaf 5)
|
||||
CYAN=$(tput setaf 6)
|
||||
WHITE=$(tput setaf 7)
|
||||
RESET=$(tput sgr0)
|
||||
BOLD=$(tput bold)
|
||||
|
||||
uptime=`cat /proc/uptime | cut -f1 -d.`
|
||||
upDays=$((uptime/60/60/24))
|
||||
upHours=$((uptime/60/60%24))
|
||||
upMins=$((uptime/60%60))
|
||||
upSecs=$((uptime%60))
|
||||
|
||||
echo -e "${GREEN}
|
||||
.:^~~~~^:. ${RESET}$(hostname)${GREEN}
|
||||
.^!?JJJJJJJJJJ?!^. -------------------------------------------------
|
||||
~?JJJJJJJJJJJJJJJJ?~ ${RESET}$(cat /etc/redhat-release)${GREEN}
|
||||
:?JJJJJJJJJJJJJJJJJJJJ?: ${RESET}Uptime: ${BOLD}$upDays days $upHours hours $upMins minutes $upSecs seconds${GREEN}
|
||||
.?JJJJJJJJJJJJJJ7?JJJJJJ?.
|
||||
!JJJJJJJJJJJJJ7: ^?JJJJJ!
|
||||
7JJJJJJJJJJJ!: ^7JJJ7
|
||||
!JJJJJJJJJ!. :. :7J!
|
||||
.?JJJJJ?~. :7JJ!. :.
|
||||
:?JJ?~. ^7JJJJJJ!:
|
||||
.~~ ^?JJJJJJJJY?:
|
||||
^?YYJJJJJJ?!^.
|
||||
.:^~~~~^:. _____ _
|
||||
.^!?JJJJJJJJJJ?!^. | __ \ | |
|
||||
~?JJJJJJJJJJJJJJJJ?~ | |__) |___ ___| | ___ _
|
||||
:?JJJJJJJJJJJJJJJJJJJJ?: | _ // _ \ / __| |/ / | | |
|
||||
.?JJJJJJJJJJJJJJ7?JJJJJJ?. | | \ \ (_) | (__| <| |_| |
|
||||
!JJJJJJJJJJJJJ7: ^?JJJJJ! |_| \_\___/ \___|_|\_\\__, |
|
||||
7JJJJJJJJJJJ!: ^7JJJ7 _ _ __/ |
|
||||
!JJJJJJJJJ!. :. :7J! | | (_) |___/
|
||||
.?JJJJJ?~. :7JJ!. :. | | _ _ __ _ ___ __
|
||||
:?JJ?~. ^7JJJJJJ!: | | | | '_ \| | | \ \/ /
|
||||
.~~ ^?JJJJJJJJY?: | |____| | | | | |_| |> <
|
||||
^?YYJJJJJJ?!^. |______|_|_| |_|\__,_/_/\_\
|
||||
.:^~~~~^:.
|
||||
${RESET}
|
||||
"
|
||||
|
||||
We hope you enjoy your stay.
|
||||
|
@ -47,6 +47,9 @@
|
||||
- name: Configure common scripts
|
||||
ansible.builtin.import_tasks: tasks/scripts.yml
|
||||
|
||||
- name: Configure motd and banners
|
||||
ansible.builtin.import_tasks: tasks/banners.yml
|
||||
|
||||
- name: Configure common skel items
|
||||
ansible.builtin.import_tasks: tasks/skel.yml
|
||||
|
||||
|
9
tasks/banners.yml
Normal file
9
tasks/banners.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Default motd banner
|
||||
ansible.builtin.copy:
|
||||
src: "etc/motd"
|
||||
dest: "/etc/motd"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0644'
|
||||
...
|
Loading…
Reference in New Issue
Block a user