All checks were successful
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-centos) (push) Successful in 13s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-debian) (push) Successful in 12s
Ansible Code Pipeline / Ansible-Development-Pipeline (ansible-dev-fedora) (push) Successful in 13s
21 lines
504 B
YAML
21 lines
504 B
YAML
---
|
|
- name: Format uptime using Jinja
|
|
ansible.builtin.set_fact:
|
|
motd_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
|
|
|
|
|
|
...
|