From ebb48f5b8b38ca153f37a41b070446196bdb6277 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 25 Nov 2019 11:01:39 +0000 Subject: [PATCH] Show the MOTD --- roles/home-cli/files/hushlogin | 0 roles/home-cli/files/shrc | 5 +++++ roles/home-cli/tasks/dotfiles.yml | 8 ++++---- 3 files changed, 9 insertions(+), 4 deletions(-) delete mode 100644 roles/home-cli/files/hushlogin diff --git a/roles/home-cli/files/hushlogin b/roles/home-cli/files/hushlogin deleted file mode 100644 index e69de29..0000000 diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index d9adff4..6fea3ed 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -222,6 +222,11 @@ fi case $- in *i*) # Shell is interactive + if ! test -f .hushlogin && test -r /etc/motd; then + echo "---- BEGIN MOTD ----" + cat /etc/motd + echo "----- END MOTD -----" + fi printf "\033[7m" uname -sr printf "\033[0m" diff --git a/roles/home-cli/tasks/dotfiles.yml b/roles/home-cli/tasks/dotfiles.yml index 814abd9..e1c7a69 100644 --- a/roles/home-cli/tasks/dotfiles.yml +++ b/roles/home-cli/tasks/dotfiles.yml @@ -7,10 +7,10 @@ copy: src: gitconfig dest: "{{ ansible_env.HOME }}/.gitconfig" -- name: Copy .hushlogin - copy: - src: hushlogin - dest: "{{ ansible_env.HOME }}/.hushlogin" +- name: Remove .hushlogin + file: + path: "{{ ansible_env.HOME }}/.hushlogin" + state: absent - name: Copy .inputrc copy: src: inputrc