# wireguard ~~ roles/wireguard/tasks/main.yml # create keys and configuration for wireguard hosts --- - name: ensure wireguard directory exists on remote file: path: /etc/wireguard owner: "0" group: "0" mode: "0700" state: directory - name: ensure wiregard configuration is copied on remote copy: src: "{{ wg_host_conf }}" dest: "/etc/wireguard/{{ global.dcontroller }}.conf" owner: "0" group: "0" mode: "0600"