From fb0dbf28a0e7979050858256d2040d734b282afe Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Sat, 22 Jan 2022 19:59:11 +0100 Subject: new net with nat64 --- roles/install_wg_add_vpn/tasks/main.yml | 30 ++++++++++++++++++++++ .../templates/wg_add_vpn.service.j2 | 10 ++++++++ 2 files changed, 40 insertions(+) create mode 100644 roles/install_wg_add_vpn/tasks/main.yml create mode 100644 roles/install_wg_add_vpn/templates/wg_add_vpn.service.j2 (limited to 'roles/install_wg_add_vpn') diff --git a/roles/install_wg_add_vpn/tasks/main.yml b/roles/install_wg_add_vpn/tasks/main.yml new file mode 100644 index 0000000..40ed07c --- /dev/null +++ b/roles/install_wg_add_vpn/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: install wg_add dependencies + pacman: + name: + - git + - make + - gcc + state: present + +- name: clone wg_add repo + git: + repo: https://github.com/FreifunkMYK/wg_add.git + dest: /opt/wg_add_vpn + version: vpn + +- name: build wg_add + make: + chdir: /opt/wg_add_vpn + +- name: install wg_add service + template: + src: wg_add_vpn.service.j2 + dest: /etc/systemd/system/wg_add_vpn.service + mode: 0644 + +- name: start and enable wgkex service + systemd: + name: wg_add_vpn + state: started + enabled: yes diff --git a/roles/install_wg_add_vpn/templates/wg_add_vpn.service.j2 b/roles/install_wg_add_vpn/templates/wg_add_vpn.service.j2 new file mode 100644 index 0000000..da1470d --- /dev/null +++ b/roles/install_wg_add_vpn/templates/wg_add_vpn.service.j2 @@ -0,0 +1,10 @@ +[Unit] +Description=wg_add +After=network.target + +[Service] +ExecStart=/opt/wg_add_vpn/wg_add {{ ansible_default_ipv4.interface }} wgmyk +Restart=always + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3-54-g00ecf