From 518babe328a82b3b9ef443d7d1a2c2d0d53222c6 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Wed, 5 Feb 2025 17:14:17 +0100 Subject: [PATCH] Remove motd files for rhel --- roles/configuration/tasks/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roles/configuration/tasks/main.yml b/roles/configuration/tasks/main.yml index c12bb84..0a3662a 100644 --- a/roles/configuration/tasks/main.yml +++ b/roles/configuration/tasks/main.yml @@ -235,6 +235,15 @@ - /mnt/etc/issue - /etc/issue.net + - name: Remove motd files + when: os | lower in ["rhel8", "rhel9"] + ansible.builtin.file: + path: "{{ item }}" + state: absent + loop: + - /etc/motd.d/cockpit + - /etc/motd.d/insights-client + - name: Setup Network block: - name: Generate UUID for Network Profile @@ -295,9 +304,10 @@ validate: /usr/sbin/visudo --check --file=%s - name: Fix SELinux + when: os | lower in ['almalinux', 'fedora', 'rhel8', 'rhel9', 'rocky'] block: - name: Relabel the filesystem - when: os | lower in ['almalinux', 'rhel8', 'rhel9', 'rocky'] + when: os | lower != "fedora" ansible.builtin.command: "arch-chroot /mnt /sbin/fixfiles onboot" changed_when: result.rc == 0 register: result