Fixes
All checks were successful
Ansible Code Pipeline / Ansible-Development-Pipeline (push) Successful in 15s

This commit is contained in:
2025-08-25 13:28:27 -04:00
parent c1bf3ddefb
commit 79b3a22519
7 changed files with 19 additions and 133 deletions

View File

@ -1,13 +1,13 @@
---
motd_motd_file: /etc/motd
motd_host_ip : "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
motd_host_uptime : "{{ now().replace(microsecond=0) - now().fromtimestamp(now(fmt='%s') | int - ansible_uptime_seconds) }}"
motd_host_ip: "{{ ansible_default_ipv4.address | default('127.0.0.1') }}"
motd_host_uptime: "{{ now().replace(microsecond=0) - now().fromtimestamp(now(fmt='%s') | int - ansible_uptime_seconds) }}"
motd_day_filter : "(.* day[s]?),\\s+(\\d+):(\\d+):(\\d+)"
motd_nonday_filter : "(\\d+):(\\d+):(\\d+)"
motd_day_filter: "(.* day[s]?),\\s+(\\d+):(\\d+):(\\d+)"
motd_nonday_filter: "(\\d+):(\\d+):(\\d+)"
motd_day_filter_repl : "\\1 \\2 hours \\3 minutes"
motd_day_filter_repl: "\\1 \\2 hours \\3 minutes"
motd_nonday_filter_repl : "\\1 hours \\2 minutes \\3 seconds"
...

View File

@ -8,13 +8,9 @@
{{ 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
...

View File

@ -1,12 +1,11 @@
---
- name: Deploy and configure SNMP
block:
- name: Set package name for Debian 12
- name: Set package name for Debian
ansible.builtin.set_fact:
snmpd_conf_snmp_pkg: snmpd
when:
- ansible_distribution | lower == 'debian'
- ansible_distribution_major_version == '12'
- name: Install SNMP
ansible.builtin.package: