reglt conflit
This commit is contained in:
commit
b81cbb8021
@ -1,3 +0,0 @@
|
|||||||
[pt]
|
|
||||||
ap33-pt
|
|
||||||
|
|
65
ansible/wg.yml
Normal file
65
ansible/wg.yml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
- hosts: wg
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: arrete unattended-upgrades
|
||||||
|
service:
|
||||||
|
name: unattended-upgrades
|
||||||
|
state: stopped
|
||||||
|
|
||||||
|
- name: installe Wireguard
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- wireguard
|
||||||
|
- wireguard-tools
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- hosts: wg_master
|
||||||
|
tasks:
|
||||||
|
- name: copie le fichier wg0-1.conf et wg0-2.conf vers les machines master et cli
|
||||||
|
copy:
|
||||||
|
src: mkwgconf.sh
|
||||||
|
dest: mkwgconf.sh
|
||||||
|
|
||||||
|
- name: generations fichier configuration wireguard wg0-1.conf etc
|
||||||
|
shell: bash mkwgconf.sh
|
||||||
|
|
||||||
|
- name: récupération du fichier wg0-1.conf vers ap33-ans
|
||||||
|
fetch:
|
||||||
|
src: wg0-1.conf
|
||||||
|
dest: wg0-1.conf
|
||||||
|
flat: yes
|
||||||
|
|
||||||
|
- name: récupération du fichier wg0-2.conf vers ap33-ans
|
||||||
|
fetch:
|
||||||
|
src: wg0-2.conf
|
||||||
|
dest: wg0-2.conf
|
||||||
|
flat: yes
|
||||||
|
|
||||||
|
- hosts: wg
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: copie fichier wg0-1 vers les clients
|
||||||
|
copy:
|
||||||
|
src: wg0-1.conf
|
||||||
|
dest: /etc/wireguard/wg0.conf
|
||||||
|
when: ansible_hostname == "ap33-mon"
|
||||||
|
|
||||||
|
- name: copie fichier wg0-2 vers les clients
|
||||||
|
copy:
|
||||||
|
src: wg0-2.conf
|
||||||
|
dest: /etc/wireguard/wg0.conf
|
||||||
|
when: ansible_hostname == "ap33-prod"
|
||||||
|
|
||||||
|
- hosts: wg
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Activation de wireguard
|
||||||
|
service:
|
||||||
|
name: wg-quick@wg0.service
|
||||||
|
enabled: yes
|
||||||
|
|
||||||
|
- name: Redémarre le wireguard
|
||||||
|
service:
|
||||||
|
name: wg-quick@wg0.service
|
||||||
|
state: restarted
|
@ -6,7 +6,11 @@ AddressAwg=10.0.0.1/24 # Adresse VPN Wireguard extremite A
|
|||||||
EndpointA=172.16.0.122 # Adresse extremite A
|
EndpointA=172.16.0.122 # Adresse extremite A
|
||||||
PortA=51820 # Port ecoute extremite A
|
PortA=51820 # Port ecoute extremite A
|
||||||
AddressBwg=10.0.0.2/24 # Adresse VPN Wireguard extremite B
|
AddressBwg=10.0.0.2/24 # Adresse VPN Wireguard extremite B
|
||||||
|
<<<<<<< HEAD:ansible/wireguard/mkwgconf.sh
|
||||||
EndpointB=172.16.0.120 # Adresse extremite B
|
EndpointB=172.16.0.120 # Adresse extremite B
|
||||||
|
=======
|
||||||
|
EndpointB=172.16.0.121 # Adresse extremite B
|
||||||
|
>>>>>>> d29ce732af0fce68c555df54563113473c3a0c5b:ansible/mkwgconf.sh
|
||||||
PortB=51820 # Port ecoute extremite B
|
PortB=51820 # Port ecoute extremite B
|
||||||
AddressCwg=10.0.0.3/24 # Adresse VPN Wireguard extremite C
|
AddressCwg=10.0.0.3/24 # Adresse VPN Wireguard extremite C
|
||||||
EndpointC=172.16.0.121 # Adresse extremite C
|
EndpointC=172.16.0.121 # Adresse extremite C
|
||||||
|
Loading…
x
Reference in New Issue
Block a user