Skip to content
Snippets Groups Projects
Commit f9672dac authored by antoine.blancy's avatar antoine.blancy
Browse files

a

parent 74e423eb
No related branches found
No related tags found
1 merge request!1TP3
Pipeline #18148 passed
- name: curl - name: curl
hosts: h1 hosts: h1
roles:
- hosts
- post
- keys
become: yes become: yes
vars: vars:
addr: 10.0.1.2 addr: 10.0.1.2
...@@ -10,7 +14,3 @@ ...@@ -10,7 +14,3 @@
- name: install curl - name: install curl
apt: apt:
name: curl name: curl
\ No newline at end of file
roles:
- hosts
- post
- wireguard
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
roles: roles:
- hosts - hosts
- post - post
- wireguard - keys
handlers: handlers:
- name: nginx-restarter - name: nginx-restarter
service: service:
......
File moved
...@@ -18,11 +18,3 @@ ...@@ -18,11 +18,3 @@
- name: key-set - name: key-set
set_fact: set_fact:
publickey: "{{public_key.stdout}}" publickey: "{{public_key.stdout}}"
- name: bruh
shell:
cmd: touch yolo
- name: bruh2
shell:
cmd: echo "{{ hostvars[otherHost].publickey }}" >> yolo
- name: interface config
template:
src: wg
dest: /etc/wireguard/wg0.conf
- name: restart wg
shell: wg-quick down wg0; wg-quick up wg0
\ No newline at end of file
[Interface]
Address = {{ myAddr }}
PostUp = wg set %i private-key privatekey
ListenPort = 51902
[Peer]
PublicKey = {{ server_pubkey }}
Endpoint = {{ dst }}:51888
AllowedIPs = 10.0.0.0/24
wg.yml 0 → 100644
- name: h1_key_set
host: h1
roles:
- role: wg
vars:
otherHost: h2
myAddr: 10.0.0.1
dst: 10.0.3.2
- name: h2_key_set
host: h2
roles:
- role: wg
vars:
otherHost: h1
myAddr: 10.0.0.2
dst: 10.0.1.2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment