From 2ce6c3d3a4b4fb54cda9846273ed6418eec459d3 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 27 Aug 2019 22:24:09 +0200 Subject: [PATCH] fix ansible_managed handling --- templates/etc/hosts.j2 | 2 +- templates/etc/resolv.conf.j2 | 3 +-- templates/etc/sysconfig/network-scrips/ifcfg.j2 | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/etc/hosts.j2 b/templates/etc/hosts.j2 index a36280a..d697371 100644 --- a/templates/etc/hosts.j2 +++ b/templates/etc/hosts.j2 @@ -1,5 +1,5 @@ #jinja2: lstrip_blocks: True -# {{ ansible_managed }} +{{ ansible_managed | comment }} 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 {% if not network_disable_ipv6 %} ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 diff --git a/templates/etc/resolv.conf.j2 b/templates/etc/resolv.conf.j2 index 8ce520f..195de64 100644 --- a/templates/etc/resolv.conf.j2 +++ b/templates/etc/resolv.conf.j2 @@ -1,5 +1,4 @@ -# {{ ansible_managed }} - +{{ ansible_managed | comment }} {% for item in network_dns_server %} nameserver {{ item }} {% endfor %} diff --git a/templates/etc/sysconfig/network-scrips/ifcfg.j2 b/templates/etc/sysconfig/network-scrips/ifcfg.j2 index a2d16fc..a799cc7 100644 --- a/templates/etc/sysconfig/network-scrips/ifcfg.j2 +++ b/templates/etc/sysconfig/network-scrips/ifcfg.j2 @@ -1,5 +1,5 @@ #jinja2: trim_blocks: True, lstrip_blocks: True -# {{ ansible_managed }} +{{ ansible_managed | comment }} DEVICE="{{ item.key }}" {%+ for key, value in item.value.items() -%} {{ key | upper }}="{{ value }}"