Add vars for replace filter
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
---
|
||||
- name: Format uptime containing days
|
||||
ansible.builtin.set_fact:
|
||||
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_day_filter, '\\1 \\2 hours \\3 minutes') }}"
|
||||
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_day_filter, motd_day_filter_repl) }}"
|
||||
when:
|
||||
- "'day' in motd_host_uptime"
|
||||
|
||||
|
||||
- name: Format uptime not containing days
|
||||
ansible.builtin.set_fact:
|
||||
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_nonday_filter, '\\1 hours \\2 minutes \\3 seconds') }}"
|
||||
uptime_formatted: "{{ motd_host_uptime | regex_replace(motd_nonday_filter, motd_nonday_filter_repl) }}"
|
||||
when:
|
||||
- "'day' not in motd_host_uptime"
|
||||
|
||||
|
Reference in New Issue
Block a user