From 1a0b81ac648ceb166a928d10ae396a8e469c0fb7 Mon Sep 17 00:00:00 2001
From: Douglas Landgraf <dlandgra@redhat.com>
Date: Mon, 5 Dec 2022 11:57:03 -0500
Subject: [PATCH] reset: RedHat based distro with major version >=8 (#9537)

During the reset, restart network was not completing in distros
like RHEL/CentOS/AlmaLinux with major version higher than 8.

Example:
kubespray> ansible-playbook -i inventory/mydomain/hosts.yml reset.yml -b -v
fatal: [mynode]: FAILED! => {"changed": false, "msg": "Could not find the requested service network: host"}

Signed-off-by: Douglas Schilling Landgraf <dlandgra@redhat.com>

Signed-off-by: Douglas Schilling Landgraf <dlandgra@redhat.com>
---
 roles/reset/tasks/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/reset/tasks/main.yml b/roles/reset/tasks/main.yml
index 3c33815c2..60f9d015d 100644
--- a/roles/reset/tasks/main.yml
+++ b/roles/reset/tasks/main.yml
@@ -390,7 +390,7 @@
   service:
     name: >-
       {% if ansible_os_family == "RedHat" -%}
-      {%- if ansible_distribution_major_version|int == 8 or is_fedora_coreos or ansible_distribution == "Fedora" -%}
+      {%- if ansible_distribution_major_version|int >= 8 or is_fedora_coreos or ansible_distribution == "Fedora" -%}
       NetworkManager
       {%- else -%}
       network
-- 
GitLab