Actualiser ansible/wireguard/wg.yml
This commit is contained in:
parent
c3cd741134
commit
6394164a77
@ -2,6 +2,7 @@
|
||||
- hosts: wg
|
||||
become: true
|
||||
|
||||
|
||||
tasks:
|
||||
- name: Installation paquets
|
||||
apt:
|
||||
@ -23,43 +24,34 @@
|
||||
- name: Generation des fichiers de conf
|
||||
shell: bash mkwgconf-p2p.sh
|
||||
|
||||
- name: Recuperation du fichier de conf 1
|
||||
- name: Recuperation des fichiers de conf
|
||||
ansible.builtin.fetch:
|
||||
src: wg0-1.conf
|
||||
dest: wg0-1.conf
|
||||
src: "{{ item }}"
|
||||
dest: "{{ item }}"
|
||||
flat: yes
|
||||
|
||||
- name: Recuperation du fichier de conf 2
|
||||
ansible.builtin.fetch:
|
||||
src: wg0-2.conf
|
||||
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
|
||||
|
||||
loop:
|
||||
- wg0-1.conf
|
||||
- wg0-2.conf
|
||||
- wg0-3.conf
|
||||
|
||||
- hosts: wg
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Copie du fichier de conf sur serveur
|
||||
- name: Copie du fichier de conf sur serveur
|
||||
copy:
|
||||
src: wg0-1.conf
|
||||
dest: /etc/wireguard/wg0.conf
|
||||
when: ansible_hostname == "ap32-mon"
|
||||
|
||||
|
||||
- name: Copie du fichier de conf sur le client
|
||||
- name: Copie du fichier de conf sur le client 1
|
||||
copy:
|
||||
src: wg0-2.conf
|
||||
dest: /etc/wireguard/wg0.conf
|
||||
when: ansible_hostname == "ap32-test"
|
||||
|
||||
- name: Copie du fichier de conf sur le client
|
||||
- name: Copie du fichier de conf sur le client 2
|
||||
copy:
|
||||
src: wg0-3.conf
|
||||
dest: /etc/wireguard/wg0.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user