Support for Proxmox (#99)
* add PVE to the recipe * Update tasks/setup-debian-pve-variant.yml Co-authored-by: Robert Wimmer <2039811+githubixx@users.noreply.github.com> * Update tasks/setup-debian-pve-variant.yml Co-authored-by: Robert Wimmer <2039811+githubixx@users.noreply.github.com> * Update tasks/setup-debian-pve-variant.yml Co-authored-by: Robert Wimmer <2039811+githubixx@users.noreply.github.com> * Update tasks/setup-debian.yml Co-authored-by: Robert Wimmer <2039811+githubixx@users.noreply.github.com> * On Proxmox ansible_lsb.id variable is not set * change when condition for include task setup-debian-vanilla.yml to a list * add Molecule test for Proxmox * use file module to delete /var/lib/apt/lists/lock for Proxmox in Molecule test Co-authored-by: Steve Fan <29133953+stevefan1999-personal@users.noreply.github.com>master
parent
364b1fe4f0
commit
663d3b9a5f
@ -0,0 +1,27 @@
|
||||
---
|
||||
# Copyright (C) 2018-2020 Robert Wimmer
|
||||
# Copyright (C) 2019-2020 Ties de Kock
|
||||
# Copyright (C) 2021 Steve Fan
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- name: (Proxmox) Add WireGuard repository
|
||||
apt_repository:
|
||||
repo: "deb http://deb.debian.org/debian buster-backports main"
|
||||
state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}"
|
||||
update_cache: yes
|
||||
tags:
|
||||
- wg-install
|
||||
|
||||
- name: (Proxmox) Install kernel headers for the currently running kernel to compile WireGuard with DKMS
|
||||
apt:
|
||||
name:
|
||||
- "pve-headers-{{ ansible_kernel }}"
|
||||
state: present
|
||||
|
||||
- name: (Proxmox) Install WireGuard packages
|
||||
apt:
|
||||
name:
|
||||
- "wireguard"
|
||||
state: present
|
||||
tags:
|
||||
- wg-install
|
@ -1,10 +1,17 @@
|
||||
---
|
||||
# Copyright (C) 2020 Stefan Haun
|
||||
# Copyright (C) 2021 Steve Fan
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- include_tasks: "setup-debian-raspbian.yml"
|
||||
when: ansible_lsb.id == "Raspbian"
|
||||
when: ansible_lsb.id is defined and ansible_lsb.id == "Raspbian"
|
||||
register: wireguard__register_raspbian_setup
|
||||
|
||||
- include_tasks: "setup-debian-pve-variant.yml"
|
||||
when: ansible_kernel.find("pve") != -1
|
||||
register: wireguard__register_pve_variant_setup
|
||||
|
||||
- include_tasks: "setup-debian-vanilla.yml"
|
||||
when: wireguard__register_raspbian_setup is skipped
|
||||
when:
|
||||
- wireguard__register_raspbian_setup is skipped
|
||||
- wireguard__register_pve_variant_setup is skipped
|
||||
|
Loading…
Reference in New Issue