aboutsummaryrefslogtreecommitdiffstats
path: root/roles/wireguard/tasks/main.yml
blob: 3b8f8aebfd7d2155b209e129192a78056041c393 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# 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
remember that computers suck.