|
|
@@ -0,0 +1,30 @@ |
|
|
|
--- |
|
|
|
|
|
|
|
- name: debian packages |
|
|
|
apt: |
|
|
|
pkg: |
|
|
|
- wireguard |
|
|
|
- jo |
|
|
|
|
|
|
|
- name: ansible local facts directory |
|
|
|
file: |
|
|
|
path: /etc/ansible/facts.d |
|
|
|
state: directory |
|
|
|
|
|
|
|
- name: private key |
|
|
|
command: sh -c "umask 077; wg genkey > /etc/wireguard/private_key" |
|
|
|
args: |
|
|
|
creates: /etc/wireguard/private_key |
|
|
|
notify: gather facts again |
|
|
|
|
|
|
|
- name: ansible local facts |
|
|
|
copy: |
|
|
|
src: wireguard-local-facts.sh |
|
|
|
dest: /etc/ansible/facts.d/wireguard.fact |
|
|
|
mode: 0750 |
|
|
|
notify: gather facts again |
|
|
|
|
|
|
|
- name: flush handlers |
|
|
|
ansible.builtin.meta: flush_handlers |
|
|
|
|
|
|
|
- include_tasks: "method/{{wireguard_configuration_method}}.yaml" |