You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.3 KiB
YAML
41 lines
1.3 KiB
YAML
---
|
|
# Copyright (C) 2018-2022 Robert Wimmer
|
|
# Copyright (C) 2019-2020 Ties de Kock
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
- name: (Debian) Tasks for Debian version <= 10
|
|
when:
|
|
- ansible_distribution_major_version is version('11', '<')
|
|
block:
|
|
- name: (Debian) Add WireGuard repository on buster
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb http://deb.debian.org/debian buster-backports main"
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: (Debian) Install kernel headers for the currently running kernel to compile Wireguard with DKMS
|
|
ansible.builtin.apt:
|
|
name:
|
|
- "linux-headers-{{ ansible_kernel }}"
|
|
state: present
|
|
|
|
- name: (Debian) Get architecture
|
|
ansible.builtin.command: "dpkg --print-architecture"
|
|
register: wireguard__fact_dpkg_arch
|
|
changed_when: false
|
|
check_mode: false
|
|
|
|
- name: (Debian) Install kernel headers metapackage to ensure headers will be installed
|
|
ansible.builtin.apt:
|
|
name:
|
|
- "linux-headers-{{ wireguard__fact_dpkg_arch.stdout }}"
|
|
state: present
|
|
when:
|
|
- ('-cloud-' not in ansible_kernel)
|
|
|
|
- name: (Debian) Install WireGuard packages
|
|
ansible.builtin.apt:
|
|
name:
|
|
- "wireguard"
|
|
state: present
|