|
|
|
---
|
|
|
|
# Copyright (C) 2020 Stefan Haun
|
|
|
|
# Copyright (C) 2021 Steve Fan
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
- name: Setup for Raspbian
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: "setup-debian-raspbian-buster.yml"
|
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- wg-install
|
|
|
|
when:
|
|
|
|
- ansible_lsb.id is defined
|
|
|
|
- ansible_lsb.id == "Raspbian"
|
|
|
|
- ansible_lsb.major_release is version('11', '<')
|
|
|
|
register: wireguard__register_raspbian_setup
|
|
|
|
|
|
|
|
- name: Setup for Proxmox VE variants
|
|
|
|
block:
|
|
|
|
- name: Setup Proxmox VE host
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: "setup-debian-pve-host-variant.yml"
|
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- wg-install
|
|
|
|
when:
|
|
|
|
- ansible_virtualization_role == "host"
|
|
|
|
register: wireguard__register_pve_host_variant_setup
|
|
|
|
|
|
|
|
- name: Setup Proxmox VE guest
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: "setup-debian-pve-guest-variant.yml"
|
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- wg-install
|
|
|
|
when:
|
|
|
|
- ansible_virtualization_role == "guest"
|
|
|
|
register: wireguard__register_pve_guest_variant_setup
|
|
|
|
when:
|
|
|
|
- ansible_kernel.find("pve") != -1
|
|
|
|
|
|
|
|
- name: Setup for Debian
|
|
|
|
ansible.builtin.include_tasks:
|
|
|
|
file: "setup-debian-vanilla.yml"
|
|
|
|
apply:
|
|
|
|
tags:
|
|
|
|
- wg-install
|
|
|
|
when:
|
|
|
|
- wireguard__register_raspbian_setup is skipped
|
|
|
|
- wireguard__register_pve_guest_variant_setup is skipped
|
|
|
|
- wireguard__register_pve_host_variant_setup is skipped
|