diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a4441..07484dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog --------- +**7.0.0** + +- Switched to install from ELRepo KMOD package for CentOS (see https://www.wireguard.com/install/). This change may break installation for systems with custom kernels. The role previously supported custom kernel implicitly because it was using DKMS package (contribution by @elcomtik) + + Role removes DKMS wireguard package, however it doesn't remove jdoss-wireguard-epel-7 repository. If you don't need this repository, do cleanup by: + * remove `/etc/yum.repos.d/wireguard.repo` + + **6.3.1** - Support Openstack Debian images (contribution by @pallinger) diff --git a/tasks/main.yml b/tasks/main.yml index ac056c0..b27cbb2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -2,7 +2,13 @@ - name: Gather instance facts setup: -- include_tasks: "setup-{{ ansible_distribution|lower }}.yml" +- include_tasks: "{{ item }}" + with_first_found: + - "setup-{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}.yml" + - "setup-{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml" + - "setup-{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml" + - "setup-{{ ansible_distribution|lower }}.yml" + - "setup-{{ ansible_os_family|lower }}.yml" - name: Enable WireGuard kernel module modprobe: diff --git a/tasks/setup-centos-7.yml b/tasks/setup-centos-7.yml new file mode 100644 index 0000000..cddcccd --- /dev/null +++ b/tasks/setup-centos-7.yml @@ -0,0 +1,29 @@ +--- +- name: (CentOS 7) Install EPEL & ELRepo repository + yum: + name: + - epel-release + - https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm + update_cache: yes + +- name: (CentOS 7) Install yum-plugin-elrepo + yum: + name: yum-plugin-elrepo + update_cache: yes + +- name: (CentOS 7) Ensure wireguard DKMS package is removed + yum: + name: + - "wireguard-dkms" + state: absent + tags: + - wg-install + +- name: (CentOS 7) Install wireguard packages + yum: + name: + - "kmod-wireguard" + - "wireguard-tools" + state: present + tags: + - wg-install diff --git a/tasks/setup-centos-8.yml b/tasks/setup-centos-8.yml new file mode 100644 index 0000000..edce375 --- /dev/null +++ b/tasks/setup-centos-8.yml @@ -0,0 +1,24 @@ +--- +- name: (CentOS 8) Install EPEL & ELRepo repository + yum: + name: + - epel-release + - elrepo-release + update_cache: yes + +- name: (CentOS 8) Ensure wireguard DKMS package is removed + yum: + name: + - "wireguard-dkms" + state: absent + tags: + - wg-install + +- name: (CentOS 8) Install wireguard packages + yum: + name: + - "kmod-wireguard" + - "wireguard-tools" + state: present + tags: + - wg-install diff --git a/tasks/setup-centos.yml b/tasks/setup-centos.yml deleted file mode 100644 index 4a17708..0000000 --- a/tasks/setup-centos.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: (CentOS) Add WireGuard repository - get_url: - url: https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo - dest: /etc/yum.repos.d/wireguard.repo - -- name: (CentOS) Install EPEL repository - yum: - name: epel-release - update_cache: yes - -- name: (CentOS) Install wireguard packages - yum: - name: - - "wireguard-dkms" - - "wireguard-tools" - state: present - tags: - - wg-install