From ead6752bab8aafdafa03605b3352cc232f7771c9 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 21 Mar 2024 10:31:10 -0400 Subject: [PATCH] MOTD CPU spacing fix --- galaxy.yml | 2 +- roles/motd/templates/motd.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index a12b872..0941842 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,7 +8,7 @@ namespace: jchristianh name: baseos # The version of the collection. Must be compatible with semantic versioning -version: 1.0.32 +version: 1.0.33 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/roles/motd/templates/motd.j2 b/roles/motd/templates/motd.j2 index a5c7c04..e63fe88 100644 --- a/roles/motd/templates/motd.j2 +++ b/roles/motd/templates/motd.j2 @@ -16,7 +16,7 @@ Host : {{ inventory_hostname }} IP : {{ motd_host_ip }} -CPU : {{ ansible_processor_vcpus }} x {{ ansible_processor[2] }} +CPU : {{ ansible_processor_vcpus }} x {{ ansible_processor[2] | regex_replace('\\s+', ' ') }} Memory : {{ "{0:0.2f}".format(ansible_memfree_mb/1024) }} GB free of {{ (ansible_memtotal_mb/1024)|round}} GB Platform : {{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_kernel }} Up : {{ uptime_formatted | trim }} -- 2.47.1