Chris Hammer 67423daa30
All checks were successful
continuous-integration/drone/push Build is passing
Optimization for MOTD
2024-03-03 20:33:25 -05:00

21 lines
522 B
YAML

---
- name: Format uptime using Jinja
ansible.builtin.set_fact:
uptime_formatted: |
{% if 'day' in motd_host_uptime %}
{{ motd_host_uptime | regex_replace(motd_day_filter, motd_day_filter_repl) }}
{% else %}
{{ motd_host_uptime | regex_replace(motd_nonday_filter, motd_nonday_filter_repl) }}
{% endif %}
- name: Update MOTD
ansible.builtin.template:
src : templates/motd.j2
dest : "{{ motd_motd_file }}"
mode : "0644"
changed_when : false
...