blob: 3b8f8aebfd7d2155b209e129192a78056041c393 (
plain) (
tree)
|
|
# wireguard ~~ roles/wireguard/tasks/main.yml
# create keys and configuration for wireguard hosts
---
- name: set local directory for wireguard output
set_fact:
wg_dir: "{{ inventory_dir }}/files/wireguard"
- name: set local config files for wireguard output
set_fact:
wg_dcontroller_conf: "{{ wg_dir }}/{{ global.dcontroller }}.conf"
wg_dcontroller_keys: "{{ wg_dir }}/{{ global.dcontroller }}.keys"
wg_host_conf: "{{ wg_dir }}/{{ ansible_host }}.conf"
wg_host_keys: "{{ wg_dir }}/{{ ansible_host }}.keys"
- name: include generation configuratin
include_tasks: generate.yml
- name: include synchronization configuration
include_tasks: synchronize.yml
- name: include service configuration
include_tasks: service.yml
- name: include server setup
include_tasks: server.yml
when: ansible_host == global.dcontroller
|