Actualiser ansible/wireguard/wg.yml
This commit is contained in:
parent
7e3ad27afc
commit
d9e23b440b
@ -35,6 +35,12 @@
|
|||||||
dest: wg0-2.conf
|
dest: wg0-2.conf
|
||||||
flat: yes
|
flat: yes
|
||||||
|
|
||||||
|
- name: Recuperation du fichier de conf 3
|
||||||
|
ansible.builtin.fetch:
|
||||||
|
src: wg0-3.conf
|
||||||
|
dest: wg0-3.conf
|
||||||
|
flat: yes
|
||||||
|
|
||||||
|
|
||||||
- hosts: wg
|
- hosts: wg
|
||||||
become: true
|
become: true
|
||||||
@ -53,6 +59,11 @@
|
|||||||
dest: /etc/wireguard/wg0.conf
|
dest: /etc/wireguard/wg0.conf
|
||||||
when: ansible_hostname == "ap32-test"
|
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
|
- name: Activation du service wireguard au demarrage
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
@ -63,3 +74,5 @@
|
|||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: wg-quick@wg0.service
|
name: wg-quick@wg0.service
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user