19 lines
521 B
YAML
19 lines
521 B
YAML
- name: Set MOTD to display fastfetch on login
|
|
copy:
|
|
content: |
|
|
#!/bin/bash
|
|
# Managed by Ansible - Do not edit manually
|
|
if [[ -z "${FASTFETCH_MOTD_SHOWN:-}" && -z "${SUDO_USER:-}" ]]; then
|
|
fastfetch -s os:kernel:uptime:packages:shell:disk:cpu:memory:localip:colors
|
|
export FASTFETCH_MOTD_SHOWN=1
|
|
fi
|
|
dest: /etc/profile.d/motd.sh
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Remove default MOTD file if it exists
|
|
file:
|
|
path: /etc/motd
|
|
state: absent
|
|
|