Actualiser ansible/wireguard/wg.yml

This commit is contained in:
uap32-2025-r 2024-11-14 14:25:56 +01:00
parent 7e3ad27afc
commit d9e23b440b

View File

@ -35,6 +35,12 @@
dest: wg0-2.conf
flat: yes
- name: Recuperation du fichier de conf 3
ansible.builtin.fetch:
src: wg0-3.conf
dest: wg0-3.conf
flat: yes
- hosts: wg
become: true
@ -53,6 +59,11 @@
dest: /etc/wireguard/wg0.conf
when: ansible_hostname == "ap32-test"
- name: Copie du fichier de conf sur le client
copy:
src: wg0-3.conf
dest: /etc/wireguard/wg0.conf
when: ansible_hostname == "ap32-prod"
- name: Activation du service wireguard au demarrage
ansible.builtin.service:
@ -63,3 +74,5 @@
ansible.builtin.service:
name: wg-quick@wg0.service
state: restarted