ansible-pilote/tasks/motd.yml
Julien Riou d8c17dad4b
fix: Invalid arguments in MOTD and Nagios
Signed-off-by: Julien Riou <julien@riou.xyz>
2024-07-27 09:51:20 +02:00

20 lines
409 B
YAML

---
- name: Install figlet
ansible.builtin.package:
name: figlet
state: present
- name: Run figlet
ansible.builtin.shell:
cmd: >-
set -o pipefail
hostname | figlet -f /usr/share/figlet/smslant.flf
executable: /bin/bash
register: _motd
changed_when: true
- name: Create motd
ansible.builtin.copy:
dest: /etc/motd
content: "{{ _motd.stdout }}\n"
mode: "0644"