2ef11ac648
* Rename debian-setup role to point to vanilla Debian * Add a specific setup role for Raspbian This role will fail for now, Raspbian is not supported by this role as it is. * Add a switch for Raspbian * Add Raspbian role for installing WireGuard * Raspbian: Handle reboot with molly-guard and older Ansible versions
35 lines
801 B
YAML
35 lines
801 B
YAML
---
|
|
- name: (Debian) Install GPG - required to add wireguard key
|
|
apt:
|
|
name: gnupg
|
|
state: present
|
|
|
|
- name: (Debian) Add WireGuard repository on buster or earlier
|
|
apt_repository:
|
|
repo: "deb http://deb.debian.org/debian buster-backports main"
|
|
state: present
|
|
update_cache: yes
|
|
when: ansible_distribution_version | int <= 10
|
|
tags:
|
|
- wg-install
|
|
|
|
- name: (Debian) Get architecture
|
|
command: "dpkg --print-architecture"
|
|
register: dpkg_arch
|
|
changed_when: False
|
|
|
|
- name: (Debian) Install kernel headers to compile Wireguard with DKMS
|
|
apt:
|
|
name:
|
|
- "linux-headers-{{ dpkg_arch.stdout }}"
|
|
state: present
|
|
|
|
- name: (Debian) Install wireguard packages
|
|
apt:
|
|
name:
|
|
- "wireguard-dkms"
|
|
- "wireguard-tools"
|
|
state: present
|
|
tags:
|
|
- wg-install
|