Bugs fixed and improvements added in task Wireguard #1
@@ -8,15 +8,15 @@
|
|||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.name }}"
|
label: "{{ item.name }}"
|
||||||
|
|
||||||
- name: "Generate and save private key"
|
- name: "Generate and save peer private keys"
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
wg genkey > {{ wireguard_client_config_dir }}/peer_{{ item.name }}_private.key
|
wg genkey > {{ wireguard_config_dir }}/peer_{{ item.item.name }}_private.key
|
||||||
chmod 0600 {{ wireguard_client_config_dir }}/peer_{{ item.name }}_private.key
|
chmod 0600 {{ wireguard_config_dir }}/peer_{{ item.item.name }}_private.key
|
||||||
loop: "{{ peer_key_stat.results }}"
|
loop: "{{ peer_key_stat.results }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item.item.name }}"
|
label: "{{ item.item.name }}"
|
||||||
when: not item.stat.exists
|
when: not item.stat.exists
|
||||||
# no_log: true
|
no_log: false
|
||||||
|
|
||||||
- name: "Read all private keys"
|
- name: "Read all private keys"
|
||||||
ansible.builtin.slurp:
|
ansible.builtin.slurp:
|
||||||
|
|||||||
Reference in New Issue
Block a user