fix: Move containers tasks
This commit is contained in:
parent
cf129a2a44
commit
a6070477ad
22
tasks/container.yml
Normal file
22
tasks/container.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
# 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 }}"
|
||||||
|
|
||||||
|
- name: Installer l'outil de configuration
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
name: wireguard-tools
|
||||||
|
become: true
|
@ -8,27 +8,10 @@
|
|||||||
when: wireguard_module_host | length == 0
|
when: wireguard_module_host | length == 0
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Tâches de gestion du module du noyau
|
- name: Importer les tâches spécifique aux conteneurs
|
||||||
block:
|
ansible.builtin.import_tasks:
|
||||||
- name: Charger le module du noyau
|
file: container.yml
|
||||||
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
|
|
||||||
when: wireguard_module_host | length > 0
|
when: wireguard_module_host | length > 0
|
||||||
become: true
|
|
||||||
delegate_to: "{{ wireguard_module_host }}"
|
|
||||||
|
|
||||||
- name: Installer l'outil de configuration
|
|
||||||
ansible.builtin.apt:
|
|
||||||
update_cache: true
|
|
||||||
name: wireguard-tools
|
|
||||||
when: wireguard_module_host | length > 0
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Déployer la configuration des interfaces
|
- name: Déployer la configuration des interfaces
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
Loading…
Reference in New Issue
Block a user