Commit 02a80445 authored by nanahira's avatar nanahira

update kernel for centos 8

parent 596a8f9c
Pipeline #2218 passed with stage
in 5 minutes and 24 seconds
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- name: dnf - name: dnf
become: true become: true
dnf: dnf:
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,python3-devel,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils,ipset,fish # nfs-common,fish name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python3-pip,python3-devel,tcpdump,rsync,htop,mtr,net-tools,ctags,astyle,xclip,traceroute,tar,unzip,nmap,python3-libselinux,mosh,subversion,haveged,nfs-utils,ipset,fish,wireguard-tools # nfs-common,fish
update_cache: yes update_cache: yes
- name: Fedora packages - name: Fedora packages
become: true become: true
......
- name: elrepo-release - name: yum elrepo-release
become: true become: true
yum: yum:
update_cache: yes update_cache: yes
name: epel-release,elrepo-release name: epel-release,elrepo-release
when: ansible_distribution_major_version|int == 7
- name: yum plugin - name: yum plugin
become: true become: true
yum: yum:
update_cache: yes update_cache: yes
name: yum-plugin-elrepo name: yum-plugin-elrepo
#- name: remove old kernel headers when: ansible_distribution_major_version|int == 7
# become: true - name: yum install kernel
# yum:
# name: kernel-devel,kernel-headers
# state: absent
- name: install kernel
become: true become: true
yum: yum:
update_cache: yes update_cache: yes
state: latest state: latest
name: kernel-ml name: kernel-ml
enablerepo: elrepo-kernel enablerepo: elrepo-kernel
- name: kernel-devel if possible when: ansible_distribution_major_version|int == 7
- name: yum kernel-devel if possible
become: true become: true
ignore_errors: true ignore_errors: true
yum: yum:
state: latest state: latest
name: kernel-ml-devel name: kernel-ml-devel
enablerepo: elrepo-kernel enablerepo: elrepo-kernel
- name: kernel-headers if possible when: ansible_distribution_major_version|int == 7
- name: yum kernel-headers if possible
become: true become: true
ignore_errors: true ignore_errors: true
yum: yum:
state: latest state: latest
name: kernel-ml-headers name: kernel-ml-headers
enablerepo: elrepo-kernel enablerepo: elrepo-kernel
- name: remove wireguard-dkms when: ansible_distribution_major_version|int == 7
- name: yum remove wireguard-dkms
become: true become: true
yum: yum:
name: kmod-wireguard,wireguard-dkms name: kmod-wireguard,wireguard-dkms
state: absent state: absent
when: ansible_distribution_major_version|int >= 8
- name: dnf elrepo-release
become: true
dnf:
update_cache: yes
name: epel-release,elrepo-release
when: ansible_distribution_major_version|int >= 8
- name: dnf plugin
become: true
dnf:
update_cache: yes
name: dnf-plugin-elrepo
when: ansible_distribution_major_version|int >= 8
- name: dnf install kernel
become: true
dnf:
update_cache: yes
state: latest
name: kernel-ml
enablerepo: elrepo-kernel
when: ansible_distribution_major_version|int >= 8
- name: dnf kernel-devel if possible
become: true
ignore_errors: true
dnf:
state: latest
name: kernel-ml-devel
enablerepo: elrepo-kernel
when: ansible_distribution_major_version|int >= 8
- name: dnf kernel-headers if possible
become: true
ignore_errors: true
dnf:
state: latest
name: kernel-ml-headers
enablerepo: elrepo-kernel
when: ansible_distribution_major_version|int >= 8
- name: dnf remove wireguard-dkms
become: true
dnf:
name: kmod-wireguard,wireguard-dkms
state: absent
when: ansible_distribution_major_version|int >= 8
- name: change grub - name: change grub
become: true become: true
lineinfile: lineinfile:
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
become: true become: true
dnf: dnf:
name: '*' name: '*'
update_cache: true
state: latest state: latest
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8 when: ansible_os_family == 'RedHat' and ansible_distribution_major_version|int >= 8
- name: install a python alternate to prevent ansible problems - name: install a python alternate to prevent ansible problems
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- name: yum - name: yum
become: true become: true
yum: yum:
name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,python-devel,python3-pip,python3-devel,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,libselinux-python3,mosh,subversion,fish,haveged,mtr,rsync,nfs-utils,ipset # astyle name: curl,wget,git,vim,sudo,byobu,iftop,iotop,gcc,gcc-c++,make,autoconf,p7zip,p7zip-plugins,python-pip,python-devel,python3-pip,python3-devel,tcpdump,rsync,htop,mtr,net-tools,ctags,xclip,traceroute,tar,unzip,iperf,iperf3,nmap,libselinux-python,libselinux-python3,mosh,subversion,fish,haveged,mtr,rsync,nfs-utils,ipset,wireguard-tools # astyle
update_cache: yes update_cache: yes
- name: open-vm-tools - name: open-vm-tools
become: true become: true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment