diff --git a/tasks/main.yml b/tasks/main.yml index 2739330..0bfb739 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -80,7 +80,9 @@ when: wireguard__register_config_file.stat.exists - name: Derive WireGuard public key - shell: "echo '{{ wireguard__fact_private_key }}' | wg pubkey" # noqa 306 + command: "wg pubkey" + args: + stdin: "{{ wireguard__fact_private_key }}" register: wireguard__register_public_key changed_when: false tags: