aboutsummaryrefslogblamecommitdiffstats
path: root/roles/wireguard/tasks/configuration.yml
blob: 610c191d16d764ffe4d6641f937a5c186d2e28c3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

   
                                        
                           









                                                     
                       




                                                                        
---

- name: generate wireguard configuration
  ansible.builtin.template:
    src: wireguard.conf.j2
    dest: "{{ wireguard_local_dir }}/{{ item }}.conf"
    mode: 0600
  vars:
    host: "{{ hostvars[item] }}"
  run_once: true
  delegate_to: localhost
  loop: "{{ groups.all }}"

- name: copy wireguard configuration
  ansible.builtin.copy:
    src: "{{ wireguard_local_dir }}/{{ wireguard_local_configuration }}"
    dest: "{{ wireguard_dir }}/{{ wireguard_domain_controller }}.conf"
    owner: 0
    group: 0
    mode: 0600
remember that computers suck.