You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
467 B
YAML

---
- name: Generate private key
command: >-
/bin/sh -c "/usr/bin/wg genkey > {{ wireguard_client_private_key | quote }}"
args:
creates: "{{ wireguard_client_private_key }}"
register: wireguard_private_key
delegate_to: 127.0.0.1
- name: Generate public key
command: >-
/bin/sh -c "< {{ client_public_key | quote }} /usr/bin/wg pubkey > {{ wireguard_client_private_key | quote }}"
when: wireguard_private_key.changed
delegate_to: 127.0.0.1