Add non-standard kernel installation for RockyLinux 8 (#146)
* Add non-standard kernel installation for RockyLinux 8 * Add test VM in molecule tests for Rocky8 non-standard installation method * Rename non-standard to dkms as an install method * Automate installation process : kmod if possible, dkms as fallback * BUGFIX : dmks installation needs EPEL repo for wireguard-tools * Molecule : install ELRepo mainline kernel for rocky8 dkms installation * Revert "Automate installation process : kmod if possible, dkms as fallback" This reverts commit 822fbcbe5d8c484ecd984df57fd170749d6b97c1. * Molecule : add wireguard_rockylinux8_installation_method variable to test-wg-rocky8-dkms
This commit is contained in:
parent
2b3c878715
commit
59651ccb2a
4 changed files with 94 additions and 17 deletions
|
@ -57,3 +57,16 @@ wireguard_centos7_installation_method: "standard"
|
|||
|
||||
# The default seconds to wait for machine to reboot and respond
|
||||
wireguard_centos7_kernel_plus_reboot_timeout: "600"
|
||||
|
||||
#########################################
|
||||
# Settings only relevant for RockyLinux 8
|
||||
#########################################
|
||||
|
||||
# Set wireguard_rockylinux8_installation_method to "dkms"
|
||||
# to build WireGuard module from source, with wireguard-dkms.
|
||||
# This is required if you use a custom kernel and/or your arch
|
||||
# is not x64_64.
|
||||
#
|
||||
# The default of "standard" will install the kernel module
|
||||
# with kmod-wireguard from ELRepo.
|
||||
wireguard_rockylinux8_installation_method: "standard"
|
||||
|
|
|
@ -136,6 +136,17 @@ platforms:
|
|||
groups:
|
||||
- vpn
|
||||
- fedora
|
||||
- name: test-wg-rocky8-dkms
|
||||
box: generic/rocky8
|
||||
interfaces:
|
||||
- auto_config: true
|
||||
network_name: private_network
|
||||
type: static
|
||||
ip: 192.168.10.130
|
||||
groups:
|
||||
- vpn
|
||||
- el8
|
||||
- el8-dkms
|
||||
|
||||
provisioner:
|
||||
name: ansible
|
||||
|
@ -211,6 +222,12 @@ provisioner:
|
|||
wireguard_port: 51823
|
||||
wireguard_persistent_keepalive: "30"
|
||||
wireguard_endpoint: "192.168.10.120"
|
||||
test-wg-rocky8-dkms:
|
||||
wireguard_address: "10.10.10.130/24"
|
||||
wireguard_port: 51820
|
||||
wireguard_persistent_keepalive: "30"
|
||||
wireguard_endpoint: "192.168.10.130"
|
||||
wireguard_rockylinux8_installation_method: "dkms"
|
||||
|
||||
scenario:
|
||||
name: kvm
|
||||
|
|
|
@ -45,3 +45,16 @@
|
|||
ansible.builtin.apt:
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- hosts: el8-dkms
|
||||
remote_user: vagrant
|
||||
become: true
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Install ELRepo mainline kernel
|
||||
ansible.builtin.raw: |
|
||||
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
|
||||
dnf install -y https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm
|
||||
dnf --enablerepo=elrepo-kernel install -y kernel-ml
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
|
|
@ -2,22 +2,56 @@
|
|||
# Copyright (C) 2021 Robert Wimmer
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- name: (Rocky Linux 8) Install EPEL & ELRepo repository
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- epel-release
|
||||
- elrepo-release
|
||||
update_cache: true
|
||||
- name: (Rocky Linux 8) Tasks for standard kernel
|
||||
block:
|
||||
- name: (Rocky Linux 8) Install EPEL & ELRepo repository
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- epel-release
|
||||
- elrepo-release
|
||||
update_cache: true
|
||||
|
||||
- name: (Rocky Linux 8) Ensure WireGuard DKMS package is removed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "wireguard-dkms"
|
||||
state: absent
|
||||
- name: (Rocky Linux 8) Ensure WireGuard DKMS package is removed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "wireguard-dkms"
|
||||
state: absent
|
||||
|
||||
- name: (Rocky Linux 8) Install WireGuard packages
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "kmod-wireguard"
|
||||
- "wireguard-tools"
|
||||
state: present
|
||||
when:
|
||||
- wireguard_rockylinux8_installation_method == "standard"
|
||||
|
||||
- name: (Rocky Linux 8) Tasks for non-standard kernel
|
||||
block:
|
||||
- name: (Rocky Linux 8) Install jdoss/wireguard COPR repository
|
||||
community.general.copr:
|
||||
state: enabled
|
||||
name: jdoss/wireguard
|
||||
chroot: epel-8-{{ ansible_architecture }}
|
||||
|
||||
- name: (Rocky Linux 8) Install EPEL repository
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- epel-release
|
||||
update_cache: true
|
||||
|
||||
- name: (Rocky Linux 8) Ensure WireGuard KMOD package is removed
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "kmod-wireguard"
|
||||
state: absent
|
||||
|
||||
- name: (Rocky Linux 8) Install WireGuard packages
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "wireguard-dkms"
|
||||
- "wireguard-tools"
|
||||
state: present
|
||||
when:
|
||||
- wireguard_rockylinux8_installation_method == "dkms"
|
||||
|
||||
- name: (Rocky Linux 8) Install WireGuard packages
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "kmod-wireguard"
|
||||
- "wireguard-tools"
|
||||
state: present
|
||||
|
|
Loading…
Reference in a new issue