From 5e738f40a79bda3a6aa52ae5fd1b66e2df84b700 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 3 May 2019 15:52:50 +0200 Subject: [PATCH] Uniformize motd --- roles/baseconfig/files/update-motd.d/00-logo | 3 +-- roles/baseconfig/files/update-motd.d/10-uname | 3 +++ roles/baseconfig/tasks/main.yml | 12 ++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 roles/baseconfig/files/update-motd.d/10-uname diff --git a/roles/baseconfig/files/update-motd.d/00-logo b/roles/baseconfig/files/update-motd.d/00-logo index 0a78ea0..025257f 100755 --- a/roles/baseconfig/files/update-motd.d/00-logo +++ b/roles/baseconfig/files/update-motd.d/00-logo @@ -1,6 +1,5 @@ #!/bin/sh -# /etc/update-motd.d/00-logo -# Deployed with Aurore Ansible ! +# {{ ansible_managed }} # Pretty uptime upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)" diff --git a/roles/baseconfig/files/update-motd.d/10-uname b/roles/baseconfig/files/update-motd.d/10-uname new file mode 100755 index 0000000..4586095 --- /dev/null +++ b/roles/baseconfig/files/update-motd.d/10-uname @@ -0,0 +1,3 @@ +#!/bin/sh +# {{ ansible_managed }} +uname -snrvm diff --git a/roles/baseconfig/tasks/main.yml b/roles/baseconfig/tasks/main.yml index 18ebf0e..9784ac1 100644 --- a/roles/baseconfig/tasks/main.yml +++ b/roles/baseconfig/tasks/main.yml @@ -23,9 +23,17 @@ # Pimp my server - name: Customize motd copy: - src: update-motd.d/00-logo - dest: /etc/update-motd.d/00-logo + src: "update-motd.d/{{ item }}" + dest: "/etc/update-motd.d/{{ item }}" mode: 0755 + loop: + - 00-logo + - 10-uname + +- name: Remove Debian warranty motd + file: + path: /etc/motd + state: absent # Configure APT mirrors on Debian Stretch - name: Configure APT mirrors