From 7c77be0c1318bbe22c16f899c0f638903b026478 Mon Sep 17 00:00:00 2001 From: jhomen368 Date: Thu, 12 Sep 2024 11:26:39 -0700 Subject: [PATCH] fix(rhel_09_252035): fix templating and resolv.conf template syntax Signed-off-by: jhomen368 --- tasks/Cat2/RHEL-09-25xxxx.yml | 4 ++-- templates/etc/resolv.conf.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/Cat2/RHEL-09-25xxxx.yml b/tasks/Cat2/RHEL-09-25xxxx.yml index 96e5d3f..3ef02a9 100644 --- a/tasks/Cat2/RHEL-09-25xxxx.yml +++ b/tasks/Cat2/RHEL-09-25xxxx.yml @@ -331,9 +331,9 @@ rhel9stig_network_manager_dns.stdout == 'none' or rhel9stig_network_manager_dns.stdout == 'unmanaged' ansible.builtin.template: - dest: /etc/resolv.conf.j2 + dest: /etc/resolv.conf mode: '0644' - src: /etc/resolv.conf + src: etc/resolv.conf.j2 - name: "MEDIUM | RHEL-09-252035 | PATCH | RHEL 9 systems using Domain Name Servers (DNS) resolution must have at least two name servers configured." when: diff --git a/templates/etc/resolv.conf.j2 b/templates/etc/resolv.conf.j2 index 27e421a..2ed0377 100644 --- a/templates/etc/resolv.conf.j2 +++ b/templates/etc/resolv.conf.j2 @@ -3,7 +3,7 @@ # Sponsored by MindPointGroup.com {% if rhel9stig_resolv_domains is defined %} # Domains -{% for domains in rhel9stig_resolv_domains +{% for domains in rhel9stig_resolv_domains %} domain {{ rhel9stig_resolv_domains }} {% endfor %} {% endif %}