wg_auto_clients #12

Merged
sinibaldi merged 6 commits from wg_auto_clients into main 2026-07-13 16:43:21 +02:00
1 changed files with 18 additions and 8 deletions
Showing only changes of commit d0efa5e9be - Show all commits

View File

@ -1,12 +1,4 @@
---
- name: Create local configs directory
become: false
local_action : ansible.builtin.file
args:
path: "{{ playbook_dir }}/wg_clients/{{ inventory_hostname }}"
state: directory
mode: '0700'
- name: Init generated Keys dict
set_fact:
generated_keys: []
@ -42,6 +34,24 @@
wg_peers: "{{ wg_peers | community.general.lists_mergeby(generated_keys,'name')}}"
- name: Delete local configs directory
become: false
local_action : ansible.builtin.file
args:
path: "{{ playbook_dir }}/wg_clients/{{ inventory_hostname }}"
state: absent
- name: Re-create local configs directory
become: false
local_action : ansible.builtin.file
args:
path: "{{ playbook_dir }}/wg_clients/{{ inventory_hostname }}"
state: directory
mode: '0700'
- name : Generate client config file
become: false
local_action : ansible.builtin.template