From 90735e5542318d14d62a648b4503d7c89959e74a Mon Sep 17 00:00:00 2001
From: entlein <einentlein@gmail.com>
Date: Sun, 28 Aug 2022 20:03:24 +0200
Subject: [PATCH] not upgradeing the kernel or rebooting anymore

---
 roles/rke2/tasks/main.yml       |  2 +-
 roles/rke2/tasks/setup_host.yml | 52 ++++++++++++++++-----------------
 2 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/roles/rke2/tasks/main.yml b/roles/rke2/tasks/main.yml
index 873af86..9ce1dca 100644
--- a/roles/rke2/tasks/main.yml
+++ b/roles/rke2/tasks/main.yml
@@ -6,7 +6,7 @@
 - block:
   - include_tasks: setup_host.yml
   - include_tasks: install_rke2.yml
-  when: ( not rke2_installed.stat.exists and state != 'absent' ) or (upgrade and state != 'absent' )
+ # when: ( not rke2_installed.stat.exists and state != 'absent' ) or (upgrade and state != 'absent' )
 
 - include_tasks: templates.yml
   when: "state != 'absent' and 'master' in group_names  "
diff --git a/roles/rke2/tasks/setup_host.yml b/roles/rke2/tasks/setup_host.yml
index 950d269..a353ee9 100644
--- a/roles/rke2/tasks/setup_host.yml
+++ b/roles/rke2/tasks/setup_host.yml
@@ -13,29 +13,29 @@
     /usr/sbin/pvresize -y -q /dev/vda2 
     /usr/sbin/lvresize -y -q -r -l +100%FREE /dev/mapper/*root 
 
-- name: Upgrade to latest kernel
-  shell: |
-    dnf upgrade -y 
-    dnf updateinfo list --security --available
-    dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm --assumeyes
-    dnf --enablerepo=elrepo-kernel install kernel-ml --assumeyes
-    touch /.autorelabel
+#- name: Upgrade to latest kernel
+#  shell: |
+#    dnf upgrade -y 
+#    dnf updateinfo list --security --available
+#    dnf install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm --assumeyes
+#    dnf --enablerepo=elrepo-kernel install kernel-ml --assumeyes
+#    touch /.autorelabel
     
-- name: install RHEL packages
-  dnf:
-    name:
-      - container-selinux
-      - iptables 
-      - libnetfilter_conntrack 
-      - libnfnetlink 
-      - libnftnl 
-      - policycoreutils-python-utils  
-      - ca-certificates
-      - openssl
-      - setools-console
-     # - libseccomp-devel #this didnt help
-      
-    state: latest
+#- name: install RHEL packages
+#  dnf:
+#    name:
+#      - container-selinux
+#      - iptables 
+#      - libnetfilter_conntrack 
+#      - libnfnetlink 
+#      - libnftnl 
+#      - policycoreutils-python-utils  
+#      - ca-certificates
+#      - openssl
+#      - setools-console
+#     # - libseccomp-devel #this didnt help
+#      
+#    state: latest
 
 - name: add kernel params
   template:
@@ -72,10 +72,10 @@
     name: etcd
     group: etcd
 
-- name: Reboot but not on upgrades, so kernel updates only install at initial runs 
-  ansible.builtin.reboot:
-    reboot_timeout: 3600
-  when: ( not upgrade ) 
+#- name: Reboot but not on upgrades, so kernel updates only install at initial runs 
+#  ansible.builtin.reboot:
+#    reboot_timeout: 3600
+#  when: ( not upgrade ) 
 
 
 - name: Disable SELinux
-- 
GitLab