Compare commits
2 Commits
v0.0.5e-jp
...
3cc5c7a773
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cc5c7a773 | ||
|
|
149e630c47 |
BIN
ansible/.wg.yml.swp
Normal file
BIN
ansible/.wg.yml.swp
Normal file
Binary file not shown.
@@ -2,10 +2,17 @@
|
|||||||
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
|
||||||
|
|
||||||
@@ -21,7 +28,11 @@ 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
|
||||||
@@ -35,7 +46,11 @@ 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,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: wg
|
- hosts: wg
|
||||||
|
<<<<<<< HEAD
|
||||||
become: yes
|
become: yes
|
||||||
tasks:
|
tasks:
|
||||||
- name: arrete unattended-upgrades
|
- name: arrete unattended-upgrades
|
||||||
@@ -63,3 +64,27 @@
|
|||||||
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