Compare commits
1 Commits
3cc5c7a773
...
v0.0.6a-rr
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f4941c25e |
Binary file not shown.
@@ -2,17 +2,10 @@
|
|||||||
set -u
|
set -u
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
AddressAwg=10.0.0.1/24 # Adresse VPN Wireguard extremite A
|
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
|
||||||
=======
|
|
||||||
AddressAwg=172.16.0.1/24 # Adresse VPN Wireguard extremite A
|
|
||||||
EndpointA=172.16.0.122 # Adresse extremite A
|
|
||||||
PortA=51820 # Port ecoute extremite A
|
|
||||||
AddressBwg=172.16.0.2/24 # Adresse VPN Wireguard extremite B
|
|
||||||
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
|
|
||||||
EndpointB=172.16.0.121 # Adresse extremite B
|
EndpointB=172.16.0.121 # Adresse extremite B
|
||||||
PortB=51820 # Port ecoute extremite B
|
PortB=51820 # Port ecoute extremite B
|
||||||
|
|
||||||
@@ -28,11 +21,7 @@ pKA=$(cat endpoint-a.pub)
|
|||||||
PKB=$(cat endpoint-b.key)
|
PKB=$(cat endpoint-b.key)
|
||||||
pKB=$(cat endpoint-b.pub)
|
pKB=$(cat endpoint-b.pub)
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
cat <<FINI > wg0-1.conf
|
cat <<FINI > wg0-1.conf
|
||||||
=======
|
|
||||||
cat <<FINI > wg1-a.conf
|
|
||||||
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
|
|
||||||
# local settings for Endpoint A
|
# local settings for Endpoint A
|
||||||
[Interface]
|
[Interface]
|
||||||
PrivateKey = $PKA
|
PrivateKey = $PKA
|
||||||
@@ -46,11 +35,7 @@ Endpoint = ${EndpointB}:$PortB
|
|||||||
AllowedIPs = $AddressBwg
|
AllowedIPs = $AddressBwg
|
||||||
FINI
|
FINI
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
cat <<FINI > wg0-2.conf
|
cat <<FINI > wg0-2.conf
|
||||||
=======
|
|
||||||
cat <<FINI > wg1-b.conf
|
|
||||||
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
|
|
||||||
# local settings for Endpoint B
|
# local settings for Endpoint B
|
||||||
[Interface]
|
[Interface]
|
||||||
PrivateKey = $PKB
|
PrivateKey = $PKB
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
- hosts: wg
|
- hosts: wg
|
||||||
<<<<<<< HEAD
|
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: arrete unattended-upgrades
|
- name: arrete unattended-upgrades
|
||||||
@@ -64,27 +63,3 @@
|
|||||||
service:
|
service:
|
||||||
name: wg-quick@wg0.service
|
name: wg-quick@wg0.service
|
||||||
state: restarted
|
state: restarted
|
||||||
=======
|
|
||||||
tasks:
|
|
||||||
- name: installe Wireguard
|
|
||||||
apt:
|
|
||||||
name:
|
|
||||||
- wireguard
|
|
||||||
- wireguard-tools
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- hosts: wg-master
|
|
||||||
tasks:
|
|
||||||
- name: copie le fichier wg1-a.conf et wg1-b.conf vers les machines master et cli
|
|
||||||
copy:
|
|
||||||
src: mkwgconf.sh
|
|
||||||
dest: mkwgconf.sh
|
|
||||||
flat: yes
|
|
||||||
- name: generations fichier configuration wireguard wg0-1.conf etc
|
|
||||||
shell: bash mkwgconf.sh
|
|
||||||
|
|
||||||
- hosts: wg-cli
|
|
||||||
tasks:
|
|
||||||
- name: copie fichier
|
|
||||||
|
|
||||||
>>>>>>> d6e080d0145615056a7a0eb3d2f9e512809eb4f5
|
|
||||||
|
|||||||
Reference in New Issue
Block a user