32 lines
750 B
YAML
32 lines
750 B
YAML
---
|
|
- name: Ensure update-motd directory exists
|
|
ansible.builtin.file:
|
|
path: /etc/update-motd.d
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: Remove static Debian motd
|
|
ansible.builtin.copy:
|
|
dest: /etc/motd
|
|
content: ""
|
|
force: true
|
|
|
|
- name: Disable default Debian MOTD scripts if present
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
mode: "0644"
|
|
loop:
|
|
- /etc/update-motd.d/10-uname
|
|
- /etc/update-motd.d/10-help-text
|
|
ignore_errors: true
|
|
|
|
- name: Remove legacy profile.d MOTD if exists
|
|
ansible.builtin.file:
|
|
path: /etc/profile.d/00_lxc-details.sh
|
|
state: absent
|
|
|
|
- name: Install custom homelab MOTD
|
|
ansible.builtin.template:
|
|
src: 99-homelab.j2
|
|
dest: /etc/update-motd.d/99-homelab
|
|
mode: "0755"
|