From 3b57009d31ab70b2db6fe3c04241bbfd10dd1487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 4 Sep 2024 16:57:05 +0200 Subject: [PATCH] Use comment jinja filter with ansible_managed --- CHANGELOG.md | 3 +++ templates/etc/xymon/hosts.cfg.j2 | 6 +++--- templates/etc/xymon/hosts.d/common.cfg.j2 | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 788b5d2..5e6797f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ * Replace flatten jinja filter with **list**. * Call module with FQCN. +### Enhancements +* Use comment jinja filter with ansible_managed to allow multi-lines comment. + ## v1.1.2 ### Enhancements diff --git a/templates/etc/xymon/hosts.cfg.j2 b/templates/etc/xymon/hosts.cfg.j2 index 5db9407..d63382a 100644 --- a/templates/etc/xymon/hosts.cfg.j2 +++ b/templates/etc/xymon/hosts.cfg.j2 @@ -1,4 +1,4 @@ -# {{ ansible_managed }} +# {{ ansible_managed | comment }} # # Master configuration file for Xymon # @@ -20,6 +20,6 @@ #page common Common -#group-except sslcert|bbd|xymond|xymongen|xymonnet|xymonproxy Test⏎ -#include hosts.d/common.cfg⏎ +#group-except sslcert|bbd|xymond|xymongen|xymonnet|xymonproxy Test +#include hosts.d/common.cfg diff --git a/templates/etc/xymon/hosts.d/common.cfg.j2 b/templates/etc/xymon/hosts.d/common.cfg.j2 index b3fa2a3..23ad118 100644 --- a/templates/etc/xymon/hosts.d/common.cfg.j2 +++ b/templates/etc/xymon/hosts.d/common.cfg.j2 @@ -1,4 +1,4 @@ -# {{ ansible_managed }} +# {{ ansible_managed | comment }} #192.168.0.1 www.{{ ansible_domain }} # apt libs SSH apache https://www.{{ ansible_domain }} #192.168.0.2 pxe.{{ ansible_domain }} # apt libs SSH DESCR:PXE CLIENT:deploy