role_wireguard/tasks/container.yml

23 lines
566 B
YAML

---
# tasks file for wireguard
- name: Tâches de gestion du module du noyau
block:
- name: Charger le module du noyau
community.general.modprobe:
name: wireguard
state: present
rescue:
- name: Installer le module du noyau sur l'hôte
ansible.builtin.apt:
update_cache: true
name: wireguard-dkms
become: true
delegate_to: "{{ wireguard_module_host | default(omit, true) }}"
- name: Installer l'outil de configuration
ansible.builtin.apt:
update_cache: true
name: wireguard-tools
become: true